Skip to content

T3McpError

Base classes

Name Children Inherits
T3Error
pyt3client.errors
Base class for every error pyt3client raises.

⋔ Inheritance diagram

graph TD
  106982418519264["errors.T3McpError"]
  106982420250208["errors.T3Error"]
  129768776220000["builtins.Exception"]
  129768776220864["builtins.BaseException"]
  129768776280576["builtins.object"]
  106982420250208 --> 106982418519264
  129768776220000 --> 106982420250208
  129768776220864 --> 129768776220000
  129768776280576 --> 129768776220864

🛈 DocStrings

Bases: T3Error

The server answered a request with a JSON-RPC error.

Unlike T3ToolError (a tool that ran and refused), this means the request itself was rejected: an unknown tool, arguments that fail the tool's input schema, or a malformed request.

Source code in src/pyt3client/errors.py
63
64
65
66
67
68
69
70
71
72
73
74
75
class T3McpError(T3Error):
    """The server answered a request with a JSON-RPC error.

    Unlike `T3ToolError` (a tool that ran and refused), this means the request
    itself was rejected: an unknown tool, arguments that fail the tool's input
    schema, or a malformed request.
    """

    def __init__(self, method: str, code: int, message: str) -> None:
        super().__init__(f"{method}: JSON-RPC error {code}: {message}")
        self.method = method
        self.code = code
        self.message = message

:fa-brands-github: Show source on GitHub