AI 개발

MCP Tool Schema vs Function Calling: 2026 AI Agent JSON 도구 호출 가이드

JSONSort 약 14분

2026년 AI Agent 구축 시 Function CallingMCP Tool Schema 중 어떤 JSON 도구 호출 방식을 쓸지가 핵심 질문입니다. JSON은 비슷해 보이지만 프로토콜·생명주기·생태계는 다릅니다.

Quick overview

Dimension Function Calling MCP Tool Schema
Role Built into model API; describes callable functions per requestOpen protocol; describes tools on external MCP Server
JSON tools[] + tool_callsinputSchema (JSON Schema subset)
Executor App parses tool_calls and invokes locallyMCP Client forwards via stdio/SSE to MCP Server
2026 pick Monolith apps, prototypes, deep vendor integrationPluggable tools, IDE/agent platforms, reusable capabilities

What problem does LLM tool calling solve?

LLMs only generate text. To query databases, call APIs, or read files, agents need a machine-readable capability description + invocation contract: the model outputs structured JSON at the right moment; the host executes and feeds results back.

In 2026, two main paths dominate: vendor Function Calling (Tool Use) and Anthropic's MCP. Both rely heavily on JSON, but at different layers—one is a frame in the model request, the other is a client-server protocol.

What is Function Calling?

Function Calling injects tool definitions into each Chat Completions request. When the model decides to call, it returns tool_calls with a function name and JSON argument string; your backend executes and returns a role: tool message.

{
  "type": "function",
  "function": {
    "name": "get_weather",
    "description": "Get current weather for a city",
    "parameters": {
      "type": "object",
      "properties": {
        "city": { "type": "string" },
        "unit": { "type": "string", "enum": ["celsius", "fahrenheit"] }
      },
      "required": ["city"]
    }
  }
}

arguments is a stringified JSON—always parse and validate. Use JSONSort to format and check syntax.

What is MCP Tool Schema?

MCP defines tools on independent MCP Servers. Clients discover via tools/list and invoke via tools/call. Parameters use JSON Schema in inputSchema.

{
  "name": "search_repo",
  "description": "Search code in a Git repository",
  "inputSchema": {
    "type": "object",
    "properties": {
      "query": { "type": "string" },
      "glob": { "type": "string" }
    },
    "required": ["query"]
  }
}

JSON structure comparison

Both can describe parameters with JSON Schema. The difference is who holds the Schema, who initiates calls, and how results flow back.

Architecture: embedded API vs open protocol

  • Function Calling: tool logic in the same app; Schema co-located with business code.
  • MCP: tools in separate Servers (stdio/SSE); ideal for pluggable capability markets (Cursor, Claude Desktop).

2026 decision tree

  1. 3–5 stable internal APIs on one SDK → Function Calling.
  2. User-installable tools or cross-IDE reuse → MCP Server.
  3. Both: MCP as capability layer, mapped to model tools upstream.

Same feature, two paths

Maintain a single Schema source and export to OpenAI parameters and MCP inputSchema. Diff versions with JSON Diff.

Parameter constraints should live in JSON Schema regardless of path. See our JSON Schema tutorial.

Common pitfalls

  • Treating MCP as a model API replacement—it provides tools, not LLM calls.
  • Oversized Schema (50+ tools) hurts latency and accuracy.
  • Ignoring double-encoded arguments strings.

FAQ

Will MCP replace Function Calling?

Not entirely. MCP solves tool supply and interoperability; Function Calling solves how the model expresses intent. The 2026 trend is layering: MCP supplies tools, the API layer maps them to a tools array.

Which JSON is simpler?

Single definitions are similarly complex. Function Calling adds tool_calls round-trip messages; MCP adds a Server process and transport, but tool JSON is often flatter.

Private agent with internal APIs only—need MCP?

Not necessarily. Fixed internal tools without a plugin ecosystem can use Function Calling alone. Reserve MCP if you expect many external data sources.

How to debug tool JSON?

Use JSONSort locally to format, validate Schema, and diff definitions—never upload tool responses with secrets to online JSON sites.

Conclusion

Function Calling is the model-side JSON tool description and call frame; MCP Tool Schema is the ecosystem-side open tool registration format. In 2026: choose Function Calling for fast closed loops; MCP for extensible tool platforms; mature teams often use both with JSON Schema as the single source of truth for parameters.

Further reading

Changelog: initial release