Skip to content

feat(mcp-server-kit): tool title, output schema and idempotent/open-world hints - #22

Merged
clbotdev merged 1 commit into
mainfrom
feat/mcp-kit-output-schema
Nov 1, 2026
Merged

clbotdev merged 1 commit into
mainfrom
feat/mcp-kit-output-schema

Conversation

@clbotdev

@clbotdev clbotdev commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

What

McpToolDefinition takes three optional fields:

  • title: a human-readable name for clients.
  • outputSchema: a Zod object schema. It's converted once per process, the same way input schemas are (refs inlined, no $schema), and advertised in tools/list. The SDK checks a successful result's structuredContent against it. A non-object schema throws when the kit is created.
  • annotations: { idempotentHint?, openWorldHint? }: risk still decides readOnlyHint and destructiveHint, so a product can't contradict it.

Tools without these fields are unchanged.

Why

SendLit is moving its MCP server onto the kit, following CourseLit's pattern. Its tools advertise output schemas, titles and these hints today, and without this change the migration would drop them from tools/list.

Testing

bun test in packages/mcp-server-kit passes (19, 2 of them new: advertising the new fields, rejecting a result that breaks its output schema, and refusing a non-object output schema). Typecheck and Biome are clean. Includes a minor changeset.

…orld hints

Products that advertise output schemas today (SendLit's 68 tools) lose them
when they move onto the kit. Tool definitions now take an optional title,
outputSchema and the two annotation hints risk does not set; tools/list
advertises them and the SDK validates structuredContent against the output
schema.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants