Add JSDoc @example tags with companion .examples.ts files#1524
Merged
jonathanhefner merged 2 commits intomodelcontextprotocol:mainfrom Feb 13, 2026
Merged
Conversation
|
@modelcontextprotocol/client
@modelcontextprotocol/server
@modelcontextprotocol/express
@modelcontextprotocol/hono
@modelcontextprotocol/node
commit: |
Create companion `.examples.ts` files for JSDoc `@example` tags: - `mcp.examples.ts` — `McpServer`, `registerTool()`, `registerResource()`, `registerPrompt()`, `connect()`, `sendLoggingMessage()`, and tool logging - `stdio.examples.ts` — `StdioServerTransport` - `completable.examples.ts` — `completable()` shown in prompt context - `streamableHttp.examples.ts` — `WebStandardStreamableHTTPServerTransport` (stateful, stateless, Hono, Workers) - `node/streamableHttp.examples.ts` — `NodeStreamableHTTPServerTransport` (stateful, stateless, Express) Add `@example` tags (with titles) to the source files for `McpServer`, `StdioServerTransport`, `completable()`, and both Streamable HTTP transport classes. Prose bullet lists on the transport classes are placed before `@example` block tags so TypeDoc renders them in the description section. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
63b3560 to
e6cc919
Compare
felixweinberger
approved these changes
Feb 13, 2026
c9ac842
into
modelcontextprotocol:main
16 of 17 checks passed
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.
Create companion
.examples.tsfiles for JSDoc@exampletags:mcp.examples.ts—McpServer,registerTool(),registerResource(),registerPrompt(),connect(),sendLoggingMessage(), and tool loggingstdio.examples.ts—StdioServerTransportcompletable.examples.ts—completable()shown in prompt contextstreamableHttp.examples.ts—WebStandardStreamableHTTPServerTransport(stateful, stateless, Hono, Workers)node/streamableHttp.examples.ts—NodeStreamableHTTPServerTransport(stateful, stateless, Express)Add
@exampletags (with titles) to the source files forMcpServer,StdioServerTransport,completable(), and both Streamable HTTP transport classes. Prose bullet lists on the transport classes are placed before@exampleblock tags so TypeDoc renders them in the description section.