{"slug": "ai-foundations-5-tool-calling", "title": "AI Foundations 5 - Tool Calling", "summary": "Tool calling lets a language model request actions it cannot perform itself, with the application executing the tool and returning results to the model's context, according to the AI Foundations 5 explainer. Each tool requires a name, a description, and a parameter schema, and every tool definition consumes tokens on every call whether or not the tool is used. The Model Context Protocol (MCP) provides a shared standard for connecting models to services such as Figma, Linear, a database, or an internal company API without custom glue code per integration.", "body_md": "# AI Foundations 5 - Tool Calling\n\nOn its own, a model can only produce text. It can’t check today’s date, read a file, or run your test suite — it can only describe what those things might look like. Tools close that gap: they let the model reach out and actually do something, then bring the result back into the conversation.\n\n## Basic tool-call flow\n\nThe pattern is always roughly the same. The model decides a tool would help, picks which one, and fills in the arguments it needs. Something outside the model — the application — actually runs it. Whatever comes back gets fed into the model’s context, and it decides what to do next based on that.\n\nThe model never runs anything itself. It only asks, and something else executes.\n\n## Coding tools\n\nIn a coding setup, the usual toolbox includes reading and writing files, searching across a codebase, running shell commands, running tests or a linter, and looking things up in documentation or on the web. Stack a handful of these together and a model can go from “here’s the bug” to “here’s a tested fix” without you typing every intermediate command.\n\n## Tool definition\n\nEach tool the model can call needs three things spelled out: a name, a description of what it does and when to use it, and a schema for its parameters. The model never sees your actual implementation — it only sees this description, so a vague or misleading one leads to the tool getting picked at the wrong moment, or called with the wrong arguments.\n\n## Cost of tools\n\nNone of this is free. Every tool’s definition sits in the model’s context on every single call, whether or not it gets used. Every result that comes back adds more. Give a model twenty tools and a habit of calling five of them per step, and your token usage climbs fast — worth watching, especially in a long agent run.\n\n## MCP\n\nModel Context Protocol is a shared standard for wiring up tools, so a client doesn’t need custom glue code for every service it wants to connect. Through MCP, a model can be hooked up to things like Figma, Linear, a database, or an internal company API, using the same connection pattern each time instead of a one-off integration per tool.\n\nPrevious: [AI Foundations 4 - Context](/2026/09/13/llm-context-basics/)\nNext: [AI Foundations 6 - Prompting and Evaluation](/2026/09/13/prompting-and-evaluation/)", "url": "https://wpnews.pro/news/ai-foundations-5-tool-calling", "canonical_source": "https://julin.ai/2026/09/13/tool-calling-basics/", "published_at": "2026-09-12 12:00:00+00:00", "updated_at": "2026-09-13 09:02:11.065778+00:00", "lang": "en", "topics": ["ai-tools", "large-language-models", "ai-agents", "developer-tools"], "entities": ["Model Context Protocol", "Figma", "Linear"], "alternates": {"html": "https://wpnews.pro/news/ai-foundations-5-tool-calling", "markdown": "https://wpnews.pro/news/ai-foundations-5-tool-calling.md", "text": "https://wpnews.pro/news/ai-foundations-5-tool-calling.txt", "jsonld": "https://wpnews.pro/news/ai-foundations-5-tool-calling.jsonld"}}