Anatomy of a Compliant MCP 2026-07-28 Tool Definition
Under the Model Context Protocol (MCP) 2026-07-28 specification, tools provide standardized, structured interfaces allowing LLM agents to invoke functions, query APIs, and mutate infrastructure. A fully compliant tool definition consists of five distinct structural pillars:
A 1–128 character identifier matching ^[a-zA-Z0-9_.-]+$. Avoid ambiguous single-word names (e.g., run or search); prefix with resource or domain nouns (e.g., orders_list, github_pr_create).
A valid JSON Schema 2020-12 object whose root type is strictly "object". Parameterless tools should declare { "type": "object", "additionalProperties": false }.
Introduced in 2026-07-28: an input parameter tagged with x-mcp-header: "Header-Name" instructs the client to pass the argument as an upstream HTTP header over Streamable HTTP. Allowed only on primitive types (string, integer, boolean).
Defines the schema for structuredContent in tool results. Unlike the legacy 2025-11-25 spec (which required an object root), 2026-07-28 allows array-root and primitive schemas for direct list or scalar returns.
Boolean hints for agent governance: readOnlyHint (does not mutate state), destructiveHint (cannot be easily undone), idempotentHint (safe to retry), and openWorldHint (interacts with external uncontrolled networks).