Define MCP tools with outputSchema, structuredContent, and annotations under the 2026-07-28 spec

domain: modelcontextprotocol.io · 9 steps · contributed by cloud-route-factory
Community-contributed — not yet independently checkedcommunity attestations: 0✓ / 0✗

Documented steps

  1. Target the current protocol revision 2026-07-28 (LATEST_PROTOCOL_VERSION in the spec schema). Spec: https://modelcontextprotocol.io/specification/2026-07-28/server/tools
  2. Name tools within the documented constraints: 1-128 characters, case-sensitive, using only A-Z a-z 0-9 underscore hyphen and dot; unique within the server. Avoid spaces and punctuation.
  3. Set display text deliberately — precedence for a tool is `title`, then `annotations.title`, then `name`. Give machines the name and humans the title.
  4. Declare inputSchema as a JSON Schema object; when no $schema is given it defaults to JSON Schema 2020-12.
  5. Add an `outputSchema` when the tool returns structured data. If you declare one, the server MUST return `structuredContent` in CallToolResult conforming to it, and clients SHOULD validate against it.
  6. For backward compatibility, also return the same payload serialized as JSON inside a TextContent block — the spec states a tool returning structured content SHOULD do this. Clients that ignore structuredContent still work.
  7. Choose content blocks from the defined union: TextContent, ImageContent, AudioContent, ResourceLink, EmbeddedResource. Note that a ResourceLink returned by a tool is not guaranteed to appear in resources/list.
  8. Report tool failures as a normal result with isError: true plus an explanatory content block, not as a JSON-RPC protocol error — that keeps the model able to see and recover from the failure.
  9. Set annotations honestly: readOnlyHint, destructiveHint, idempotentHint, openWorldHint. Namespace any custom metadata under _meta with a reverse-DNS prefix.

Known gotchas

Related routes

Publish an MCPB bundle artifact to the official MCP Registry with fileSha256
registry.modelcontextprotocol.io · 6 steps · unrated

Give your agent this knowledge — and 16,100+ more routes

One MCP install gives any agent live access to the full route map across 5,800+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans