- Home
- Skills
- Agents & Orchestration
- Tool-Call Contract Auditor
More screenshots
Works with the AI Agents you already use
Tool-Call Contract Auditor
Catch bad tool calls before they corrupt state — pre-call contracts, failure taxonomy, and when to stop vs retry. For MCP and multi-tool agents.
Free
Tool-Call Contract Auditor
Example session with this skill installed
Audit this tool call: The agent wants to call 'process_refund' for $50.00 (string) without an idempotency key. The tool is marked as irreversible. What is the verdict?
- Read your context and instructions
- Compiled the tool-call contract auditor
The tool call has been audited against the pre-call contract checklist. The call must be blocked to prevent potential state corruption.
Pre-Call Audit Report
| Check | Status | Finding |
|---|---|---|
| Tool selection | PASS | process_refund matches the intent. |
| Required args | PASS | Amount is present. |
| Types | FAIL | Amount is a string ($50.00); expected numeric format for currency processing. |
| Side-effect class | IRREVERSIBLE | Action will result in permanent financial movement. |
| Idempotency | FAIL | No idempotency or dedupe key provided for an irreversible side-effect. |
| Verdict | BLOCK | Do not fire. |
Reasoning
The request fails on two critical points. First, the arg type mismatch (string vs number) will likely trigger a validation error. Second, and more importantly, firing an irreversible call without an idempotency key violates the safety contract. If a timeout occurs, the agent will have no way to verify if the refund was processed, leading to a side-effect failure.
Next steps
- Cast the
amountargument to a proper numeric type. - Generate a unique
idempotency_key(UUID v4) for this transaction. - Re-submit the audited call for a new pre-call contract check.
Connects securely to your tools. The creator never sees your data.
About this skill
Catch bad tool calls before they corrupt state — pre-call contracts, failure taxonomy, and when to stop vs retry. For MCP and multi-tool agents.
Upgrade Path
Free teaches the checklist in conversation. Tool-Call Contract Auditor Pro ($9.99 one-time) adds scripts/lint_tool_schemas.py, scripts/replay_tool_trace.py, contract YAML templates, a GitHub Action CI gate, and Markdown/JSON export reports.
Upgrade when you maintain more than three tools, ship tools to others, or need a merge gate.
https://www.agensi.io/skills/tool-call-contract-auditor-pro
Tags: agents, mcp, tools, reliability, json-schema Version: 1.0
The Problem
You give the agent twelve tools. It calls transfer_funds with a string amount, retries a non-idempotent charge three times, then marks the task "done" because the tool returned HTTP 200 with an error body. Your dashboard looks fine. Your ledger does not.
Loops burn tokens. Bad contracts burn trust.
This is not loop detection (that is a separate concern) and not prompt-injection review. It is the contract layer: what must be true before a call fires, and what the return actually means.
What You Get
- Pre-call contract checklist — tool selection, required args, types, enums and ranges, side-effect class (read / mutate / irreversible), idempotency, retry budget, allow-deny, auth surface
- Post-call verdict rules — success vs partial vs error, with the rule that partial is never success and a timeout on an irreversible call is unknown, not retry
- Failure taxonomy — arg, auth, timeout, partial, side-effect, plus the named modes wrong-tool, bad-args, skip-retry, double-fire, partial-as-success, missing-contract
- Idempotency stop rules — when retry is safe, when to reuse the same key, and when to stop and ask for a dedupe key
- Four hard skill rules — never invent tool results, never treat HTTP 200 with an error body as success, never skip the post-call verdict, never silently retry an irreversible side effect
Why This Beats Prompting It Yourself
Telling an agent to be careful with tool calls produces a disposition, not a checklist. The failure that costs money is specific: a non-idempotent call re-fired after a timeout, or a 200-with-error-body read as done. A checklist that sorts every tool call by side-effect class before it fires, and forces one of three verdicts after it returns, catches those two failures deterministically — the same rows, the same order, every session.
It also gives a postmortem a shared vocabulary. "It was a partial-as-success" is actionable; "the agent messed up" is not.
Example Session
Ask the agent to audit a call it is about to make: process_refund for $50.00 passed as a string, no idempotency key, tool marked irreversible.
The auditor runs the pre-call rows. Tool selection passes. Required args pass. Types fail — the amount is a string where currency needs a numeric. Side-effect class reads irreversible. Idempotency fails — no dedupe key on an irreversible call. Verdict is BLOCK, with the two failing rows named and the fix stated: cast the amount, generate a UUID idempotency key, re-submit for a fresh pre-call pass.
The block happens before the call fires. Nothing is charged twice.
Use Cases
- Audit a tool call before firing it, or review a recorded session trace for contract breaks
- Decide success vs partial vs error when a tool returns 200 with an error body, a truncated body, or a timeout
- Classify a production incident into the failure taxonomy so the postmortem names one cause
- Stop an agent from re-firing an irreversible action after a timeout
Known Limitations
- Checklist and taxonomy only — no automated schema lint, no replay, no CI gate
- Cannot see tools the harness hides from the agent
- Does not replace provider-side idempotency keys
- Does not invent pass rates or sales claims
Manual checklist and taxonomy only. No automated schema linting or CI integration. Cannot see tools hidden by the agent harness. Does not replace provider-side idempotency.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before any payment.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Free forever
No account required to browse
Trust & safety
Security scan
Security scan passed 1 day ago
- Free with an Agensi account
Permissions
No special permissions declared or detected