The Problem of Fragmented Tool Integration§

Before the Model Context Protocol (MCP), every AI framework—LangChain, AutoGen, CrewAI, LlamaIndex—maintained custom dictionary schemas for defining external tools. Switching an AI application from one framework or model provider to another required rewriting function definitions, schema interfaces, and parameter handlers.

MCP unifies tool definitions into an open, language-agnostic JSON-RPC 2.0 protocol specification.

---

MCP Schema Primitives Breakdown§

An MCP server exposes capabilities under three distinct namespaces:

1. Tools (`tools/list`, `tools/call`)§

Executable functions that perform actions (e.g., executing SQL, editing local files, sending Slack messages).

2. Resources (`resources/list`, `resources/read`)§

Passive data streams and file contents exposed to the model for context injection (e.g., log feeds, database schemas).

3. Prompts (`prompts/list`, `prompts/get`)§

Pre-engineered prompt templates with parameter slots exposed directly to end users.

---

JSON-RPC 2.0 Tool Definition Example§

{
  "jsonrpc": "2.0",
  "method": "tools/list",
  "result": {
    "tools": [
      {
        "name": "query_database",
        "description": "Execute a read-only SQL query against the PostgreSQL database.",
        "inputSchema": {
          "type": "object",
          "properties": {
            "sql": { "type": "string", "description": "SELECT query to execute" },
            "limit": { "type": "number", "default": 50 }
          },
          "required": ["sql"]
        }
      }
    ]
  }
}