Writing Effective Descriptions
The description is the most critical part of your function definition.Be Specific
❌ Bad:Include Trigger Examples
Specify When NOT to Call
Parameter Design
Use Enums for Constrained Values
❌ Bad:Provide Clear Descriptions
Set Validation Rules
Security
Never Hardcode Secrets
❌ Bad:Use Environment Variables
Store sensitive data in environment variables:{{API_KEY}}{{DATABASE_URL}}{{WEBHOOK_SECRET}}
Validate Inputs
Add validation in your API:Implement Rate Limiting
Error Handling
Return Clear Error Messages
Handle Timeouts
Set reasonable timeouts:Provide Fallbacks
Performance
Keep Responses Fast
- Optimize API response time (< 2 seconds)
- Use caching where appropriate
- Return only necessary data
Minimize Function Calls
- Batch operations when possible
- Cache frequently accessed data
- Avoid redundant calls