MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / mark_semantic_tool_error

Function mark_semantic_tool_error

src/mcp/server.rs:554–561  ·  view source on GitHub ↗
(value: &mut Value)

Source from the content-addressed store, hash-verified

552}
553
554fn mark_semantic_tool_error(value: &mut Value) {
555 if !tool_result_has_semantic_error(value) {
556 return;
557 }
558 if let Some(obj) = value.as_object_mut() {
559 obj.insert("isError".to_string(), json!(true));
560 }
561}
562
563/// Map response-handle failures onto actionable JSON-RPC errors at the MCP
564/// boundary so clients can distinguish bad input from cache/runtime problems.

Callers 1

handle_tools_callMethod · 0.85

Calls 2

insertMethod · 0.80

Tested by

no test coverage detected