MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / tool_failed

Function tool_failed

scripts/memlab-drive.py:35–42  ·  view source on GitHub ↗

A JSON-RPC error, or a tool result the server marked isError: MCP reports a failed tool call as a normal result, so checking only "error" counts every failure as served (a lab measuring nothing looked healthy).

(reply)

Source from the content-addressed store, hash-verified

33
34
35def tool_failed(reply):
36 """A JSON-RPC error, or a tool result the server marked isError: MCP reports
37 a failed tool call as a normal result, so checking only "error" counts every
38 failure as served (a lab measuring nothing looked healthy)."""
39 if "error" in reply:
40 return True
41 result = reply.get("result")
42 return isinstance(result, dict) and bool(result.get("isError"))
43
44
45def main():

Callers 1

mainFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected