AI Tool Use Patterns
Implements provider-agnostic function calling, agent loops, and structured tool orchestration for LLM workflows.
This skill provides a comprehensive framework for integrating tool use (function calling) into AI agents, turning LLMs from passive text generators into active problem-solvers. It establishes robust patterns for defining JSON schemas, managing iterative tool call loops with safety guards, handling parallel execution, and returning structured errors for model recovery. By following these provider-agnostic standards, developers can build reliable, type-safe agentic workflows that communicate effectively with external APIs, databases, and local scripts while maintaining strict security and cost controls.
Key Features
01Structured error handling for model-driven recovery and retries
02Standardized tool call loops with mandatory maximum step limits
035 GitHub stars
04Type-safe TypeScript implementation patterns using Zod and registries
05Support for parallel tool calls and human-in-the-loop approval gates
06Provider-agnostic tool definition using JSON Schema
Use Cases
01Building an autonomous research agent that queries multiple search APIs iteratively
02Creating a database assistant that translates natural language to SQL and executes queries
03Developing a secure code execution environment with human approval for dangerous operations