You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
graphify-mcp: tool failures return isError unset, so a missing project_path graph is indistinguishable from success to any programmatic caller #2714
When an MCP tool call fails — for example project_path pointing at a directory with no graphify-out/graph.json — the server returns a result with isError unset and delivers the
failure as ordinary text content:
Error executing graph_stats: graph.json not found: C:\some\path\graphify-out\graph.json
An LLM reading that will understand it perfectly, so the interactive experience is fine. But anything that branches programmatically on the MCP error flag reads a missing graph as a
successful call. That rules the flag out for health checks, CI gates, and rollout scripts — which
is a shame, because a multi-project server addressed by project_path is exactly the setup where a
script wants to ask "is this project's graph actually there?".
The MCP spec's isError field exists for precisely this distinction: a tool-level failure that the
model should see, as opposed to a protocol error. Setting it costs nothing and does not change what
the model reads.
Repro
Any MCP client. Minimal version using the Python SDK:
The rest of the behaviour here is good and worth saying so: a bad project_path is handled as a
tool-level failure that leaves the server alive and still serving every other graph. An error
call between two good ones changed nothing about either. The docstring in serve.py says this is
deliberate — "A client-supplied project_path must instead become a tool error, so the shared MCP
server can continue serving other graphs" — so the intent is clearly there; it just is not
reflected in the result flag.
Verified on a server started with a valid default graph and on one started without, so it
is not specific to the pure multi-project mode.
Thanks for bringing this up! I totally agree that programmatic callers need to be able to distinguish tool failures from successful calls, especially when health-checking a specific project_path. I've looked into it and opened a PR that correctly sets the isError flag on tool-level exceptions. You can track the progress here: #2715.
I've combined the fix for this MCP error handling issue with the T-SQL parser bugs (#2712 and #2713) into a single, comprehensive PR (#2716). The isError flag is now correctly set on CallToolResult upon tool exceptions. You can review the combined changes in the linked PR.
Activity
shard-c6 commentedon Aug 13, 2026
Thanks for bringing this up! I totally agree that programmatic callers need to be able to distinguish tool failures from successful calls, especially when health-checking a specific project_path. I've looked into it and opened a PR that correctly sets the isError flag on tool-level exceptions. You can track the progress here: #2715.
shard-c6 commentedon Aug 13, 2026
I've combined the fix for this MCP error handling issue with the T-SQL parser bugs (#2712 and #2713) into a single, comprehensive PR (#2716). The
isErrorflag is now correctly set onCallToolResultupon tool exceptions. You can review the combined changes in the linked PR.Set isError on MCP tool level failures