Skip to content

Conversation

@zchee
Copy link
Contributor

@zchee zchee commented Jul 28, 2025

This pull request includes various documentation updates and minor code adjustments to improve clarity and consistency across the codebase. The changes focus on refining comments, fixing references, and correcting naming conventions.

Documentation Updates:

  • mcp/server.go: Updated comments to remove references to [Server.Start] and use [Server.Run] consistently, ensuring alignment with the current implementation. [1] [2]
  • mcp/server.go: Changed the reference from [idContext] to [idContextKey] for better clarity in comments about request ID handling.
  • mcp/shared.go: Improved comments to use square brackets around type names ([ClientSession], [ServerSession], [MethodHandler]) for consistency with documentation conventions. [1] [2]
  • mcp/transport.go: Updated comments to clarify implementation details, such as changing Preempt implements jsonrpc2.Preempter to Preempt implements [jsonrpc2.Preempter].

Code Adjustments:

  • internal/jsonrpc2/conn.go: Fixed panic message strings to remove _v2 suffix for consistency with the current naming conventions. [1] [2]
  • mcp/transport.go: Renamed middleware function descriptions in comments (loggingReaderRead, loggingWriterWrite) to match method names directly. [1] [2]

Signed-off-by: Koichi Shiraishi <zchee.io@gmail.com>
}

// Middleware is a function from MethodHandlers to MethodHandlers.
// Middleware is a function from [MethodHandler] to [MethodHandler].
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct English?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes!

@jba
Copy link
Contributor

jba commented Jul 28, 2025

Your commit message looks like it was written by AI. It's very clear, but too wordy. You could have written:

mcp, jsonrpc: minor wording improvements

- add links to doc strings
- use correct symbol and package names

@jba jba merged commit 619bc41 into modelcontextprotocol:main Jul 28, 2025
3 checks passed
@zchee zchee deleted the fix-typo-panic branch July 28, 2025 16:25
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