Skip to content

Commit 05a031a

Browse files
committed
docs: drop development-journal language from docstrings/comments
Remove references to PR numbers, internal scratch notes, and design-spike shorthand that won't make sense to a fresh reader of the codebase.
1 parent 6f80f8d commit 05a031a

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

src/mcp/server/_typed_request.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
"""Shape-2 typed ``send_request`` for server-to-client requests.
1+
"""Typed ``send_request`` for server-to-client requests.
22
33
`TypedServerRequestMixin` provides a typed `send_request(req) -> Result` over
44
the host's raw `Outbound.send_raw_request`. Spec server-to-client request types
55
have their result type inferred via per-type overloads; custom requests pass
66
``result_type=`` explicitly.
77
8-
A `HasResult[R]` protocol (one generic signature, mapping declared on the
9-
request type) is the cleaner long-term shape — see FOLLOWUPS.md. This per-spec
10-
overload set is used for now to avoid touching `mcp.types`.
8+
If the spec's request set grows substantially, consider declaring the result
9+
mapping on the request types themselves (a ``__mcp_result__`` ClassVar read via
10+
a structural protocol) so this overload ladder doesn't need maintaining
11+
per-host-class.
1112
"""
1213

1314
from typing import Any, TypeVar, overload

src/mcp/server/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def __init__(self, outbound: Outbound, *, has_standalone_channel: bool) -> None:
5353
self.protocol_version: str | None = None
5454
self.initialized: anyio.Event = anyio.Event()
5555
# TODO: make this generic (Connection[StateT]) once connection_lifespan
56-
# wiring lands in ServerRunner — see FOLLOWUPS.md.
56+
# wiring lands in ServerRunner.
5757
self.state: Any = None
5858

5959
async def send_raw_request(
@@ -124,7 +124,7 @@ def check_capability(self, capability: ClientCapabilities) -> bool:
124124
Returns ``False`` if ``initialize`` hasn't completed yet.
125125
"""
126126
# TODO: redesign — mirrors v1 ServerSession.check_client_capability
127-
# verbatim for parity. See FOLLOWUPS.md.
127+
# verbatim for parity.
128128
if self.client_capabilities is None:
129129
return False
130130
have = self.client_capabilities

src/mcp/server/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ class Context(BaseContext[TransportT], PeerMixin, TypedServerRequestMixin, Gener
4242
and `TypedServerRequestMixin` (typed ``send_request(req) -> Result``). Adds
4343
``lifespan`` and ``connection``.
4444
45-
Constructed by `ServerRunner` (PR4) per inbound request and handed to the
46-
user's handler.
45+
Constructed by `ServerRunner` per inbound request and handed to the user's
46+
handler.
4747
"""
4848

4949
def __init__(

src/mcp/shared/context.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
class BaseContext(Generic[TransportT]):
2929
"""Per-request context wrapping a `DispatchContext`.
3030
31-
`ServerRunner` (PR4) constructs one per inbound request and passes it to
32-
the user's handler.
31+
`ServerRunner` constructs one per inbound request and passes it to the
32+
user's handler.
3333
"""
3434

3535
def __init__(self, dctx: DispatchContext[TransportT], meta: RequestParamsMeta | None = None) -> None:

0 commit comments

Comments
 (0)