Upgrade Schema Reference page#2038
Merged
jonathanhefner merged 31 commits intomainmodelcontextprotocol/modelcontextprotocol:mainfrom Jan 4, 2026
jonathanhefner/schema-ref-evolutionmodelcontextprotocol/modelcontextprotocol:jonathanhefner/schema-ref-evolutionCopy head branch name to clipboard
Merged
Upgrade Schema Reference page#2038jonathanhefner merged 31 commits intomainmodelcontextprotocol/modelcontextprotocol:mainfrom jonathanhefner/schema-ref-evolutionmodelcontextprotocol/modelcontextprotocol:jonathanhefner/schema-ref-evolutionCopy head branch name to clipboard
jonathanhefner merged 31 commits intomainmodelcontextprotocol/modelcontextprotocol:mainfrom
jonathanhefner/schema-ref-evolutionmodelcontextprotocol/modelcontextprotocol:jonathanhefner/schema-ref-evolutionCopy head branch name to clipboard
Conversation
This preserves the field order as written in the TypeScript source files instead of alphabetizing them, making the schema reference page consistent with `schema.ts`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds `{@link}` syntax to type references in order to make them navigable
in generated documentation.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Format TSDoc comments to use inline code styling for: - Method/endpoint names like `tasks/result`, `resources/list` - Parameter names like `includeContext`, `toolChoice` - String literal values like `"forbidden"`, `"optional"` - Type self-references like `ToolAnnotations` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change `RequestParams`, `PaginatedRequestParams`, and `NotificationParams` from `@internal` to `@category Common Types` so they appear in the generated schema reference. Previously these types were referenced by other types but couldn't be clicked or inspected, creating documentation holes. Also standardizes terminology for Common Types: - "parameters" → "params" for consistency - "response" → "result" in `EmptyResult` description - Adds missing description for `Result` type 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace backtick code references like `resources/list` with JSDoc
`{@link TypeName | endpoint/path}` syntax throughout the schema
documentation. This enables proper cross-referencing in generated
documentation while preserving the familiar endpoint paths as display
text.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Enable `jsDocCompatibility.exampleTag: false` in TypeDoc config to render examples as fenced code blocks - Update plugin to render block tags (e.g., `@example`) after summaries but before members for interfaces/classes - Add syntax highlighting CSS for example JSON - Rework vertical margins CSS for schema page 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Anchor links will appear as `#` symbols that change color on hover. assets/icons.svg#icon-anchor 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduces a new script that validates example JSON files in `schema/<version>/examples/` directories against their corresponding type definitions. Handles both legacy schema versions (using standard Ajv) and newer versions (using Ajv2020). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add section explaining how JSON examples are organized in `schema/[version]/examples/[TypeName]/` directories, where the directory name determines the schema type for validation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Remove duplicate `id="see"` attributes to ensure valid HTML - Hide defunct anchor links for "See" blocks - Add trailing colon after "See" heading - Style singular "See" links to display inline with their heading 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Change example sections from `<div>` to `<details>` elements so they can be expanded/collapsed, reducing visual clutter. The elements will be collapsed by default, but will automatically expand when navigated to via an `id` in the URL fragment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Prefix `id` attributes of example elements with the parent reflection's anchor (e.g., `id="tool-example-name"` instead of `id="example-name"`) in order to prevent collisions when multiple types have examples with the same name. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace individual `replaceAll` calls with a centralized approach using a character list, regex, and HTML entity lookup table. This makes the escaping logic more maintainable and adds support for additional special characters such as `*` and backticks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Define `InternalError`, `InvalidParamsError`, `InvalidRequestError`, `MethodNotFoundError`, and `ParseError` interfaces that extend `Error` with their standard JSON-RPC error codes. Each type includes documentation on when it should be used in MCP implementations. Move `Error` from "Common Types" to a new "Errors" section that groups all error types together. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add JSON examples for `Tool`, `CallToolRequestParams`, `CallToolResult`, `ListToolsResult`, and `ToolListChangedNotification` schema types, as well as content block schema types. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add JSON examples for resource-related types such as `Resource`, `ListResourcesResult`, `ReadResourceResult`, etc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds JSON examples for prompt-related schema types such as `ListPromptsResult`, `GetPromptRequestParams`, `GetPromptResult`, etc. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add JSON examples for completion-related types such as `CompleteRequestParams` and `CompleteResult`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds JSON examples for logging-related types such as `SetLevelRequestParams` and `LoggingMessageNotificationParams`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds a new example showing how to use the `cursor` parameter for paginated requests. Also updates the existing `ListResourcesResult` example to use base64-encoded cursor values for consistency across pagination examples. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add JSON examples for sampling-related types such as `CreateMessageRequestParams`, `CreateMessageResult`, and `SamplingMessage`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add JSON examples for roots-related types such as `ListRootsResult` and `RootsListChangedNotification`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add JSON examples for elicitation-related types such as `ElicitRequestFormParams`, `ElicitResult`, and elicitation input schemas. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add examples for initialization-related types such as `InitializeRequestParams` and `InitializeResult`. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds a new example for a progress notification with a `message` field. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds a new example for a cancelled notification with a `reason` field indicating user-requested cancellation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduces two named types to replace inline `_meta` type definitions: - `MetaObject`: A `Record<string, unknown>` type alias for `_meta` in notifications, results, and content types - `RequestMetaObject`: An interface with optional `progressToken` for `_meta` in request params This cleans up the generated schema documentation by replacing verbose inline type definitions with references to these named types. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Previously, type signature elements for members (`.tsd-signature`) were hidden via CSS. Now, the TypeDoc plugin copies their text content into each member's heading element (`.tsd-anchor-link`). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds new interfaces that extend `JSONRPCResultResponse` and wrap `*Result` types, providing full JSON-RPC response objects for documentation purposes. Also updates documentation to distinguish between `*Result` (payload only) and `*ResultResponse` (full response) types. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add JSON examples for `*Request`, `*Notification`, and `*ResultResponse` types. These complement the existing examples for payload types (`*Params`, `*Result`) by showing complete JSON-RPC message envelopes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Adds a new example showing how to include a `progressToken` in `_meta` when calling a tool. This demonstrates the connection between the token passed in tool call requests and the progress notifications that reference it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
bhosmer-ant
approved these changes
Jan 4, 2026
Contributor
bhosmer-ant
left a comment
There was a problem hiding this comment.
Beautiful piece of work!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I have been sprinting on improving the Schema Reference page. This PR contains many commits toward that goal. Each commit is a self-contained change. I can split this into multiple PRs, if desired, but I wanted to first submit a PR that shows how everything fits together.
Key changes:
@exampletag). Examples are collapsed by default to avoid overwhelming the page. Examples are also linkable, and when navigating to an example via link, the example will be automatically expanded.schema/[version]/examples/[type]/[example].json, it will be validated against the JSON schema for[type]vianpm run check(specifically,npm run check:schema:examples). Such examples can be included in doc comments via the@includeCodetag.schema/[version]/examples/[type]/[example].json.*ResultResponsetypes for corresponding*Requestand*Resulttypes. (Previously,*Requestand*Resulttypes existed, but there were no types for successful JSON-RPC responses.) Each*ResultResponsetype has a JSON example, and links to its corresponding*Requesttype.ParseError,InvalidRequestError,MethodNotFoundError,InvalidParamsError, andInternalErrortypes for error codes-32700,-32600,-32601,-32602, and-32603, respectively. These error types have doc comments explaining the scenarios in which they should be used.MetaObjectandRequestMetaObjecttypes for_metafields. These types consolidate the documentation for the_metaand_meta.progressTokenfields so that they exist in a single place on the Schema Reference page, and clean up the type signatures of the other types that use them.All changes were made with the assistance of Claude Code, but I closely guided each change and reviewed every line.
The preview is available at https://mcp-jonathanhefner-schema-ref-evolution.mintlify.app/specification/draft/schema, but here are some select screenshots:
_metatypes: