Back to Patterns

Tool-Augmented LLM Systems

Architecture Patterns

Summary

Tool-augmented LLM systems extend model capabilities by giving them access to external tools, APIs, and data sources. The Model Context Protocol (MCP) standardizes this integration, defining how models discover and invoke tools, access resources, and interact with external systems in a secure and structured way.

Key Characteristics

  • Tool Discovery: Models dynamically discover available tools and their schemas at runtime
  • Structured Invocation: Tool calls follow a defined protocol with typed parameters and error handling
  • Resource Access: Models can read structured resources and data from external systems
  • Security Boundaries: Tool execution happens in a sandboxed environment with defined permissions

Popular Models

  • Claude + MCP: Anthropic's Claude with native MCP support for tool-augmented agents
  • GPT-4 with Function Calling: OpenAI's structured function calling API for tool integration
  • Gemini with Tools: Google's tool use API with native code execution and search grounding

Build This Pattern

Copy this prompt and paste it into Claude Code, OpenCode, Codex, or Cursor to implement this pattern.

Explain tool-augmented LLM system architectures. Cover: how models connect to external systems via tool calling (function calling), the Model Context Protocol (MCP) as a standard interface for tool servers, architectural patterns for tool integration (direct SDK, MCP gateway, connector proxies), security considerations (tool permissions, audit trails, rate limiting), and how this enables agents to interact with real systems. Key design decisions: which tools to expose, how to handle failures, authentication models.