Tool Calling Quick Start
Get started with Captain’s tool calling in 5 minutes.
What is Tool Calling?
Tool calling (function calling) lets your AI use external functions like:
- Perform calculations
- Call APIs
- Query databases
- Read files
- Execute custom code
Key Point: Tools execute on your side (client), not Captain’s servers. You maintain full control.
Quick Example
Python
TypeScript (Vercel AI SDK)
How It Works
- You define tools with names, descriptions, and parameters
- Send request to Captain with tools
- Captain returns tool call request (if needed)
- You execute the tool in your environment
- Continue conversation with results (optional)
Tool Definition Format
Every tool needs:
Common Use Cases
API Call Tool
Database Query Tool
File Operation Tool
Best Practices
Do This
Don’t Do This
Framework Support
Recommendation: Use Vercel AI SDK for automatic multi-turn handling.
Troubleshooting
Tool Not Being Called
Empty Tool Arguments
Tool Execution Errors
Next Steps
- Full Tool Calling Guide - Complete documentation
- Python Examples - More Python examples
- TypeScript Examples - More TS/JS examples
Get Help
- Email: support@runcaptain.com
- Docs: docs.runcaptain.com
- Website: runcaptain.com