MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / _parse_supported

Function _parse_supported

src/mcp/client/_probe.py:33–38  ·  view source on GitHub ↗

Pull ``data.supported`` off a -32022 error, or ``None`` if not actionable.

(data: Any)

Source from the content-addressed store, hash-verified

31
32
33def _parse_supported(data: Any) -> list[str] | None:
34 """Pull ``data.supported`` off a -32022 error, or ``None`` if not actionable."""
35 try:
36 return types.UnsupportedProtocolVersionErrorData.model_validate(data).supported
37 except ValidationError:
38 return None
39
40
41async def negotiate_auto(session: ClientSession) -> None:

Calls

no outgoing calls