Clark Farming CompanySoftware Foundry

AI / Agent Reference · Reference

Tool Calling

Tool calling is the broader paradigm of enabling AI agents to use external tools — functions, APIs, commands, and services — to extend their capabilities beyond pure text generation. Function calling is one mechanism for tool calling; Model Context Protocol (Model Context Protocol) is another. Model Context Protocol standardizes how AI applications connect to external tools and data sources. Components: Client: AI ap…

draftneeds-review0 source links5 resolved links
wiki/wiki/ai-ml/tool-calling.md

Answer

Tool calling is the broader paradigm of enabling AI agents to use external tools — functions, APIs, commands, and services — to extend their capabilities beyond pure text generation. Function calling is one mechanism for tool calling; Model Context Protocol (Model Context Protocol) is another. Model Context Protocol standardizes how AI applications connect to external tools and data sources. Components: Client: AI ap…

Auto-generated neutral summary from the source page — needs human review before trusted use.

Evidence & Source Cards

No explicit artifact, library, or external source links found in this sample slice. Evidence state remains needs-review.

Source Excerpt

Tool calling is the broader paradigm of enabling AI agents to use external tools — functions, APIs, commands, and services — to extend their capabilities beyond pure text generation. Function calling is one mechanism for tool calling; Model Context Protocol (Model Context Protocol) is another.

Tool Calling vs Function Calling

AspectFunction CallingTool Calling (Model Context Protocol)
ScopeSingle API, tight integrationMulti-server, standardized protocol
StandardProvider-specific (OpenAI, Anthropic)Open protocol (Model Context Protocol)
DiscoveryHard-coded schemasDynamic tool discovery
EcosystemLimited to integrated functionsGrowing third-party server ecosystem
ComplexitySimpler, directMore infrastructure, more flexible

MCP (Model Context Protocol)

Model Context Protocol standardizes how AI applications connect to external tools and data sources.

Architecture

AI Client (Large Language Model app) ←→ Model Context Protocol Host ←→ Model Context Protocol Servers (tools, resources, prompts)

Components:

Transport Layers

TransportUse CaseProperties
stdioLocal toolsSimple, process-based, no network
SSERemote toolsServer-sent events, unidirectional
HTTPAPI integrationBidirectional, stateless

MCP Primitives

Tools: Executable functions with schemas. The server defines the tool, the client calls it.

{
  "name": "read_file",
  "description": "Read a file from the filesystem",
  "inputSchema": {
    "type": "object",
    "properties": {
      "path": { "type": "string" }
    }
  }
}

Resources: Readable data sources (files, database queries, API endpoints). Addressed by URI.

file:///path/to/file.txt
sqlite:///database.db?query=SELECT * FROM users

Prompts: Reusable prompt templates with parameters.

{name}: "summarize_file"
{description}: "Summarize the contents of a file"
{arguments}: [{ "name": "path", "description": "File path" }]

Tool Design Principles

Clarity

Reliability

Security

Multi-Tool Orchestration

Parallel Execution

When tools are independent, execute in parallel:

Prompt → [Tool A, Tool B, Tool C] → Combine results → Response

Example: Research task — search web, read local files, query database simultaneously.

Sequential Execution

When tools depend on each other:

Prompt → Tool A → Tool B (uses A's result) → Tool C (uses B's result) → Response

Example: File processing — read file → parse content → summarize → save result.

Conditional Execution

Tool selection based on intermediate results:

Prompt → Tool A → If result matches X: Tool B, else: Tool C → Response

Rate Limiting and Throttling

Common Tool Categories

Filesystem

Database

Web

Code Execution

Communication

Security Considerations

Tool Permissions

Input/Output Safety

Sandboxing

Related

Relationships

Outbound links

Referenced by

Tags

ai-mltool-callingmcpagentsautomation