Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/mcp/client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,8 @@ async def read_resource(
Raises:
InputRequiredRoundsExceededError: `input_required_max_rounds` exhausted.
MCPError: A callback returned `ErrorData` for an embedded input request.
pydantic.ValidationError: The server returned a result that does not
conform to the negotiated protocol version.
"""

async def retry(r: InputResponses | None, s: str | None) -> ReadResourceResult | InputRequiredResult:
Expand Down Expand Up @@ -711,6 +713,8 @@ async def call_tool(
Raises:
InputRequiredRoundsExceededError: `input_required_max_rounds` exhausted.
MCPError: A callback returned `ErrorData` for an embedded input request.
pydantic.ValidationError: The server returned a result that does not
conform to the negotiated protocol version.
"""

async def retry(r: InputResponses | None, s: str | None) -> CallToolResult | InputRequiredResult | Result:
Expand Down Expand Up @@ -787,6 +791,8 @@ async def get_prompt(
Raises:
InputRequiredRoundsExceededError: `input_required_max_rounds` exhausted.
MCPError: A callback returned `ErrorData` for an embedded input request.
pydantic.ValidationError: The server returned a result that does not
conform to the negotiated protocol version.
"""

async def retry(r: InputResponses | None, s: str | None) -> GetPromptResult | InputRequiredResult:
Expand Down
2 changes: 2 additions & 0 deletions src/mcp/client/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ async def send_request(
MCPError: Error response, read timeout, or connection closed.
RuntimeError: Called before entering the context manager.
ValueError: The request declares `name_param` but its params carry no string name.
pydantic.ValidationError: The server returned a result that does not
conform to the negotiated protocol version.
"""
data = request.model_dump(by_alias=True, mode="json", exclude_none=True)
method: str = data["method"]
Expand Down
Loading