Baike.dev
All toolsAI codingTrendingOpen sourceNewsSubmit
Log in
Back to tool/Back to issues
#3369·modelcontextprotocol

Two JSON example code blocks in the docs do not parse (2025-06-18 tools page, SEP-1330)

Author: Na5coCreated Sep 18, 2026Updated Sep 18, 2026

What's broken?

The documentation is wrong or misleading

Where in the spec or docs?

  • https://github.com/modelcontextprotocol/modelcontextprotocol/blob/f56f204f/docs/specification/2025-06-18/server/tools.mdx#L227 (rendered: https://modelcontextprotocol.io/specification/2025-06-18/server/tools#image-content)
  • https://github.com/modelcontextprotocol/modelcontextprotocol/blob/f56f204f/seps/1330-elicitation-enum-schema-improvements-and-standards.md#L170 (rendered: https://modelcontextprotocol.io/seps/1330-elicitation-enum-schema-improvements-and-standards)

What should happen?

Every ```json example in the docs should be valid JSON, so a reader can copy it and an SDK/test can consume it.

What actually happens?

Two examples do not parse:

  1. docs/specification/2025-06-18/server/tools.mdx, Image Content — missing comma after "mimeType": "image/png":

    Expected ',' or '}' after property value in JSON at position 82 (line 5 column 3)
  2. seps/1330-…md (and the generated docs/seps/1330-….mdx), Legacy Single Select With Titles — curly quotes around enumNames:

    “enumNames”: ["Red", "Green", "Blue"],

    The same block also has "default": "Green", which is one of the enumNames labels rather than one of the enum values (#FF0000/#00FF00/#0000FF). The new-style example directly below it uses "default": "#00FF00".

Anything else?

Fix is ready. I have a branch with the three-line fix plus the regenerated SEP page; check:seps, check:docs:format, check:docs:js-comments, check:schema:json and mint broken-links all pass:

https://github.com/modelcontextprotocol/modelcontextprotocol/compare/main...Na5co:modelcontextprotocol:docs/fix-invalid-json-examples

I tried to open it as a PR, but PR creation currently fails for non-collaborators (does not have the correct permissions to execute CreatePullRequest — same as noted in #3357). Happy to open the PR if access is granted, or a maintainer is welcome to cherry-pick a9afef0d directly.

How found: I ran every ```json block under docs/ through JSON.parse, and validated the spec pages (all six revisions) against their schema.json — JSON-RPC messages as JSONRPCMessage, plus content blocks, capabilities objects, elicitation primitive schemas, etc. These two were the only hard failures; everything else validates. If a check:docs:examples CI step would be useful, I'm glad to open a separate issue to discuss it.

AI disclosure (per AI_POLICY.md): the search, the validation script, the fix branch and this issue were prepared with Claude Code under my direction; I reviewed the changes.

Source: modelcontextprotocol/modelcontextprotocol

View original on GitHubView discussion on GitHub