MCPcopy Create free account
hub / github.com/Graphify-Labs/graphify / ToolError

Class ToolError

graphify/serve.py:36–43  ·  view source on GitHub ↗

Raised by a tool handler to signal an error result. A normal string return is sent as an ordinary (successful) text result. A ToolError is instead turned into a tool result with ``isError: true`` so a client that only checks ``isError`` can tell a genuine failure — e.g. the ``gh`` C

Source from the content-addressed store, hash-verified

34
35
36class ToolError(Exception):
37 """Raised by a tool handler to signal an error result.
38
39 A normal string return is sent as an ordinary (successful) text result. A
40 ToolError is instead turned into a tool result with ``isError: true`` so a
41 client that only checks ``isError`` can tell a genuine failure — e.g. the
42 ``gh`` CLI missing or a PR that cannot be resolved — from success.
43 """
44
45
46def _read_graph(graph_path: str) -> nx.Graph:

Callers 3

_tool_list_prsFunction · 0.85
_tool_get_pr_impactFunction · 0.85
_tool_triage_prsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected