find_precedents finds recent session evidence for a failed resume, failed tool, or missing price. Call it through POST /mcp/precedents with a workspace precedent credential.| Argument | Values | Meaning |
segment | coding, managed, business | Match the session's segment. |
finding | failed_resume, failed_tool, missing_price | Select the observation pattern to match. |
| Finding | Exact observation fields matched |
failed_resume | kind: "resume" and failed: true. |
failed_tool | kind: "tool_receipt" and state: "failed". |
missing_price | kind: "usage" and an explicit usd_micros: null. |
missing_price matches an explicit JSON null; an absent usd_micros field does not match that pattern.123456789101112{ "jsonrpc": "2.0", "id": 2, "method": "tools/call", "params": { "name": "find_precedents", "arguments": { "segment": "coding", "finding": "failed_tool" } } }
200 with a JSON-RPC result. Its content array contains one text item. Parse that item's text as JSON to obtain the evidence array.123456789101112{ "jsonrpc": "2.0", "id": 2, "result": { "content": [ { "type": "text", "text": "[{\"session\":\"01946b00-0000-7000-8000-000000000001\",\"event\":\"tool-failed-1\",\"task\":\"fix-build\",\"attempt\":\"attempt-1\"}]" } ] } }
| Field | Meaning |
session | Session UUID. |
event | Matching event identifier. |
task | Task identifier from the matching event. |
attempt | Attempt identifier from the matching event. |
"[]". A successful empty response is not an authentication error.200 with an error object in place of result:12345678{ "jsonrpc": "2.0", "id": 2, "error": { "code": -32602, "message": "Unknown finding" } }
| Code | Message | Cause |
-32601 | Unknown method | Unsupported method, or notifications/initialized sent with a non-null ID. |
-32602 | Unknown tool | Tool name is not find_precedents. |
-32602 | Unknown segment | Missing or unsupported segment. |
-32602 | Unknown finding | Missing or unsupported finding. |
{"error":"Service credential required"}:| HTTP status | Message | Cause |
400 | Invalid structured data | Body cannot be decoded as the expected JSON object. |
400 | Unexpected trailing data | Data follows the first JSON value. |
400 | Expected JSON-RPC 2.0 | jsonrpc is missing or differs from "2.0". |
401 | Service credential required | Missing Bearer authorization or token length outside 32–256 characters. |
401 | Unknown service credential | Token has no valid workspace mapping. |
403 | API key route unavailable | A scoped hs_ API key was used. |
403 | Use a configured MCP client | Request includes an Origin header. |
413 | Request body exceeds the size limit | Decoding exceeds the 256 KiB body limit. |
503 | Service credentials unavailable | Server credential configuration is missing or invalid. |
503 | Storage is temporarily unavailable | Storage or another unclassified server operation failed. |