docs: fix docstrings across public API surface#2095
Merged
Kludex merged 1 commit intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom Feb 19, 2026
jonathanhefner:clean-up-api-docsjonathanhefner/mcp-python-sdk:clean-up-api-docsCopy head branch name to clipboard
Merged
docs: fix docstrings across public API surface#2095Kludex merged 1 commit intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom jonathanhefner:clean-up-api-docsjonathanhefner/mcp-python-sdk:clean-up-api-docsCopy head branch name to clipboard
Kludex merged 1 commit intomodelcontextprotocol:mainmodelcontextprotocol/python-sdk:mainfrom
jonathanhefner:clean-up-api-docsjonathanhefner/mcp-python-sdk:clean-up-api-docsCopy head branch name to clipboard
Conversation
Fix typos (e.g., "respose", "loosing", "ommited", "beging"), grammar issues (article agreement, capitalization of "Pydantic"), and formatting (missing periods, PEP 257 blank lines after summary, erroneous literal `\n` in `cli.py` docstrings). Correct several inaccuracies in docstring content: - Update `JSONRPCMessage` references to `SessionMessage` in websocket docs - Fix `Returns` → `Yields` for `create_client_server_memory_streams()` - Fix return type description in `handle_protected_resource_response()` - Use `async def` / `await` in `Context` and `MCPServer` examples - Fix `requestedSchema` → `requested_schema` in example code - Fix `sampling/create_message` → `sampling/createMessage` - Fix `async get_data()` → `async def get_data()` syntax in example - Add missing parameter docs (`httpx_client_factory`, `icons`, `meta`, etc.)
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.
Fix typos (e.g., "respose", "loosing", "ommited", "beging"), grammar issues (article agreement, capitalization of "Pydantic"), and formatting (missing periods, PEP 257 blank lines after summary, erroneous literal
\nincli.pydocstrings).Correct several inaccuracies in docstring content:
JSONRPCMessagereferences toSessionMessagein websocket docsReturns→Yieldsforcreate_client_server_memory_streams()handle_protected_resource_response()async def/awaitinContextandMCPServerexamplesrequestedSchema→requested_schemain example codesampling/create_message→sampling/createMessageasync get_data()→async def get_data()syntax in examplehttpx_client_factory,icons,meta, etc.)