Skip to content

Comments

docs: fix docstrings across public API surface#2095

Merged
Kludex merged 1 commit intomodelcontextprotocol:mainfrom
jonathanhefner:clean-up-api-docs
Feb 19, 2026
Merged

docs: fix docstrings across public API surface#2095
Kludex merged 1 commit intomodelcontextprotocol:mainfrom
jonathanhefner:clean-up-api-docs

Conversation

@jonathanhefner
Copy link
Member

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 ReturnsYields 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 requestedSchemarequested_schema in example code
  • Fix sampling/create_messagesampling/createMessage
  • Fix async get_data()async def get_data() syntax in example
  • Add missing parameter docs (httpx_client_factory, icons, meta, etc.)

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.)
Copy link
Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

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

Amazing!

@Kludex Kludex merged commit c032854 into modelcontextprotocol:main Feb 19, 2026
27 checks passed
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