Available Examples
The template project includes 30+ working tools demonstrating all major patterns and use cases.Weather Tool
External API integration
User Data Tools
User profile management (2 tools)
Products Tools
E-commerce catalog (6 tools)
Baskets Tools
Shopping cart workflow (9 tools)
Custom Data Tools
Vector search database (6 tools)
Payment Tool
Stripe integration
Learning Path
1
Start Simple
Weather Tool - External API integrationShows how to call external APIs and handle responses
2
Platform APIs
User Data Tools - Simple platform API usageLearn how to use Lua’s built-in APIs
3
CRUD Operations
Products Tools - Complete CRUD patternCreate, read, update, delete with pagination
4
Vector Search
Custom Data Tools - Semantic searchMost powerful feature! Build searchable knowledge bases
5
Complex Workflows
Baskets Tools - Multi-step processesHandle complex business logic and state
Tool Categories
External APIs (1 tool)
Tools that integrate with external services:GetWeatherTool
File:
GetWeatherTool.tsWhat it does: Fetches real-time weather using Open-Meteo APILearn:- Making HTTP requests
- Handling API responses
- Error handling
- No API key required
Platform APIs (27 tools)
Tools using Lua’s built-in platform APIs:- User (2 tools)
- Products (6 tools)
- Baskets (9 tools)
- Orders (4 tools)
- Custom Data (6 tools)
get_user_data- Retrieve user infoupdate_user_data- Update profile
Integrations (2 tools)
Payment Tool
Stripe payment link creationLearn: Environment variables, external services
Create Post Tool
Simple exampleLearn: Basic tool structure
Quick Reference
| Tool | Complexity | Best For Learning |
|---|---|---|
| CreatePostTool | ⭐ Easy | Tool basics |
| GetWeatherTool | ⭐⭐ Medium | External APIs |
| UserDataTools | ⭐ Easy | Platform APIs |
| ProductsTools | ⭐⭐ Medium | CRUD operations |
| CustomDataTools | ⭐⭐⭐ Advanced | Vector search |
| BasketsTools | ⭐⭐⭐ Complex | Workflows |
| OrderTools | ⭐⭐ Medium | Order management |
| PaymentTool | ⭐⭐⭐ Advanced | Integrations |
How to Use These Examples
Approach 1: Copy and Modify
- Find similar tool (e.g.,
CustomDataTool.tsfor searchable data) - Copy the file
- Rename (e.g.,
ArticleTool.ts) - Update names, descriptions
- Modify logic for your domain
Approach 2: Learn Pattern, Build New
- Read an example tool
- Understand the pattern
- Close the file
- Build your own from memory
- Refer back if stuck
Approach 3: Mix and Match
- Keep useful examples as-is
- Delete irrelevant ones
- Add your custom tools alongside
- Deploy mix of examples + custom
Testing Examples
Common Patterns Demonstrated
External API Calls
External API Calls
Example:
GetWeatherTool.tsPlatform API Usage
Platform API Usage
Example:
ProductsTool.tsVector Search
Vector Search
Example:
CustomDataTool.tsMulti-Step Workflows
Multi-Step Workflows
Example:
BasketTool.tsEnvironment Variables
Environment Variables
Example:
PaymentTool.ts
