Tool Use / Function Use

Tool use enables LLMs to invoke external APIs, functions, and systems to extend their capabilities. Capabilities extended: Real-time information (web search, APIs), computation (calculators, code execution), actions (send emails, database operations), specialized tools (image generation, retrieval). Implementation patterns: Function calling APIs (structured JSON output), ReAct (reasoning + action in text), tool tokens (special vocabulary for tool invocation). Tool definition: Name, description, parameters with types, return format - clear descriptions improve selection accuracy. Execution loop: User query → model reasoning → tool selection → argument generation → execution → result injection → continued generation. Popular frameworks: LangChain, LlamaIndex, Semantic Kernel, Haystack. Multi-tool scenarios: Model chains multiple tools, routes between options, handles failures. Security: Sandboxed execution, argument validation, permission controls, audit logging. Best practices: Minimal tool set (reduce confusion), clear descriptions, error handling, rate limiting. Tool use transforms LLMs from knowledge sources into capable agents.

Take tool use / function use further

Ask the copilot about this term, or have our engineers assess it against your process.