Explain and recover from a failed tool call
explain-failureClassify failed MCP/Roblox tool calls from error, result, input, and context, then return cause, evidence, safe retry guidance, corrected input, and ranked recovery actions.
Instructions
READ-ONLY AND NO CLIENT REQUIRED. Deterministically classify a failed MCP/Roblox tool call from its error, handled result, attempted input, and optional context. Returns a standard recovery envelope with cause, exact evidence, confidence, retry safety, a schema-validated correctedInput only when safely derivable, live-registry fallback tools ranked using AI contracts and discovery, an optional useful recovery script, and concrete next actions. Use this after any failed or blocked call. It never invokes a fallback and never recommends repeating an identical failed mutation. Signature: { toolName: string, error: any?, result: any?, attemptedInput: any?, context: {[string]: any}? }. Phase: observe; cost=medium; idempotency=read-only. Requires: none. Produces: agent-guidance, grounded-evidence, failure classification, safe retry policy, ranked recovery plan. Safety: read-only. On failure: inspect tool-schema for exact fields, defaults, constraints, and an invocation example.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| error | No | Thrown error, transport error, domain error object, or error message. | |
| result | No | Handled tool result or partial result associated with the failure. | |
| context | No | Optional structured facts such as selection state, resolvedPath, correctedInput, capability results, or recent observations. | |
| toolName | Yes | Exact name of the tool that failed or returned a handled error. | |
| attemptedInput | No | The exact input passed to the failed tool; used for mutation safety and corrections. |