Sign in
All library
Library· Tools

Tool use, function calling & MCP

Function calling, JSON schemas, and MCP — the plumbing that lets an LLM reach the outside world.

#tools#mcp
6 min read

Tool use (a.k.a. function calling) is how an LLM reaches outside its context window — to search the web, query a database, call an API, or run code.

The mechanics

  1. You give the model a list of tool schemas (name, description, JSON Schema for arguments).
  2. The model responds with either text or a structured tool call.
  3. Your code executes the tool and returns the result as a new message.
  4. The model reads the result and continues.

Provider docs

Model Context Protocol (MCP)

MCP is Anthropic's open standard for exposing tools, resources, and prompts to any LLM client. Instead of re-implementing a Gmail tool for every framework, you run an MCP server once and every MCP-aware client (Claude Desktop, Cursor, OpenAI Agents SDK, etc.) can use it. See the reference servers for filesystem, GitHub, Postgres, Slack, and more.