AI Tool-Calling Failures
A tool contract should be explicit enough that both the model and runtime can reason about failure.
Diagnose
Inspect:
- Selected tool.
- Arguments and schema validation.
- Authorization.
- Runtime error.
- Returned tool result.
- Safety constraints.
Fix → Verify → Prevent
Make tool contracts clearer, validate before execution, and enforce authorization independently of model output. Test both successful and intentionally invalid calls.