Title: Schema docs: JSONRPCResponse and SamplingMessageContentBlock missing from documentation · Issue #1982 · modelcontextprotocol/modelcontextprotocol · GitHub
Open Graph Title: Schema docs: JSONRPCResponse and SamplingMessageContentBlock missing from documentation · Issue #1982 · modelcontextprotocol/modelcontextprotocol
X Title: Schema docs: JSONRPCResponse and SamplingMessageContentBlock missing from documentation · Issue #1982 · modelcontextprotocol/modelcontextprotocol
Description: Summary Two type aliases are referenced in the schema reference page but not documented: JSONRPCResponse SamplingMessageContentBlock Clicking these links leads to broken anchors. 1. JSONRPCResponse In the rendered docs (e.g., 2025-11-25 ...
Open Graph Description: Summary Two type aliases are referenced in the schema reference page but not documented: JSONRPCResponse SamplingMessageContentBlock Clicking these links leads to broken anchors. 1. JSONRPCResponse...
X Description: Summary Two type aliases are referenced in the schema reference page but not documented: JSONRPCResponse SamplingMessageContentBlock Clicking these links leads to broken anchors. 1. JSONRPCResponse...
Opengraph URL: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1982
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Schema docs: JSONRPCResponse and SamplingMessageContentBlock missing from documentation","articleBody":"## Summary\n\nTwo type aliases are referenced in the schema reference page but not documented:\n1. `JSONRPCResponse`\n2. `SamplingMessageContentBlock`\n\nClicking these links leads to broken anchors.\n\n## 1. JSONRPCResponse\n\n**In the rendered docs** (e.g., [2025-11-25 schema reference](https://modelcontextprotocol.io/specification/2025-11-25/schema)):\n\n```\nJSONRPCMessage: JSONRPCRequest | JSONRPCNotification | JSONRPCResponse\n```\n\n**Root cause:** Missing `@category JSON-RPC` tag in `schema/2025-11-25/schema.ts`:\n\n```typescript\n/**\n * A response to a request, containing either the result or error.\n */ // \u003c-- Missing @category tag\nexport type JSONRPCResponse = JSONRPCResultResponse | JSONRPCErrorResponse;\n```\n\n## 2. SamplingMessageContentBlock\n\nReferenced in `SamplingMessage` and `CreateMessageResult`:\n```\ncontent: SamplingMessageContentBlock | SamplingMessageContentBlock[]\n```\n\n**Root cause:** No JSDoc comment at all in `schema/2025-11-25/schema.ts`:\n\n```typescript\n}\nexport type SamplingMessageContentBlock = // \u003c-- No JSDoc comment\n | TextContent\n | ImageContent\n | AudioContent\n | ToolUseContent\n | ToolResultContent;\n```\n\n## Fix\n\n**For JSONRPCResponse**, add `@category JSON-RPC`:\n\n```typescript\n/**\n * A response to a request, containing either the result or error.\n *\n * @category JSON-RPC\n */\nexport type JSONRPCResponse = JSONRPCResultResponse | JSONRPCErrorResponse;\n```\n\n**For SamplingMessageContentBlock**, add a JSDoc with `@category`:\n\n```typescript\n/**\n * Content block types that can appear in sampling messages.\n *\n * @category `sampling/createMessage`\n */\nexport type SamplingMessageContentBlock =\n | TextContent\n | ImageContent\n | AudioContent\n | ToolUseContent\n | ToolResultContent;\n```\n\nBoth need to be fixed in:\n- `schema/2025-11-25/schema.ts`\n- `schema/draft/schema.ts`\n\nThen regenerate docs with `npm run generate:schema:md`.\n\n\u003csub\u003e[AI Disclaimer](https://gist.github.com/maxisbey/6123d132484e4c533eab519a2800693d)\u003c/sub\u003e","author":{"url":"https://github.com/maxisbey","@type":"Person","name":"maxisbey"},"datePublished":"2025-12-15T13:59:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1982/modelcontextprotocol/issues/1982"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:06035927-eed8-f85b-25f0-e5f0c2b23ab3 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D844:36133E:89F656D:B8936D4:696E21E4 |
| html-safe-nonce | bffa0686a10643577be83df69248fd57916f18092042ad3f859bdf3184b3cedf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEODQ0OjM2MTMzRTo4OUY2NTZEOkI4OTM2RDQ6Njk2RTIxRTQiLCJ2aXNpdG9yX2lkIjoiNjY5ODAwNjUxMjEwNzY1OTc0OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ab80aba165237664a3d236b916f567894f6efde27da7f1531d7c93d12fffc360 |
| hovercard-subject-tag | issue:3730577861 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/modelcontextprotocol/1982/issue_layout |
| twitter:image | https://opengraph.githubassets.com/30a11e503d27d8f3c63f2e69940e63f79f74fc4f53038c80c55e9787936ce015/modelcontextprotocol/modelcontextprotocol/issues/1982 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/30a11e503d27d8f3c63f2e69940e63f79f74fc4f53038c80c55e9787936ce015/modelcontextprotocol/modelcontextprotocol/issues/1982 |
| og:image:alt | Summary Two type aliases are referenced in the schema reference page but not documented: JSONRPCResponse SamplingMessageContentBlock Clicking these links leads to broken anchors. 1. JSONRPCResponse... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | maxisbey |
| hostname | github.com |
| expected-hostname | github.com |
| None | 2fbe8cba5e260284c10af515699ff9bb2d6ace05ab6c2e2e585b71d93b2812c3 |
| turbo-cache-control | no-preview |
| go-import | github.com/modelcontextprotocol/modelcontextprotocol git https://github.com/modelcontextprotocol/modelcontextprotocol.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862570523 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/modelcontextprotocol |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862570523 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/modelcontextprotocol |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 7fb3bc5c995a876085291706b75cf9b08900c338 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width