- Home
- Skills
- Testing & Debugging
- Tool Call Auditor: Check Agent Tool Calls Against Schemas
More screenshots
Works with the AI Agents you already use
Tool Call Auditor: Check Agent Tool Calls Against Schemas
by AGI Tools
Audit tool calling and function calling in your AI agent's real logs: every call and JSON output checked against its declared schema, unknown tools and broken arguments flagged, PASS or FAIL for CI.
$9.99
Tool Call Auditor: Check Agent Tool Calls Against Schemas
Example session with this skill installed
Our booking agent's new version is in logs/candidate.jsonl. Use tool-call-auditor to check its tool calls and JSON answers and tell me whether it can ship.
- Read your context and instructions
- Compiled the tool call auditor
Audit of the new version (the included demo: synthetic logs from a fictional travel agency, a real run).
Gate: FAIL (exit code 1). 6 of 12 audited calls and outputs fail: 9 tool calls and 3 structured outputs from 12 log records in four formats.
| Record | Tool | Finding |
|---|---|---|
| 2 | search_flights | $.date wrong type: expected string, got 20261220 |
| 2 | search_flights | $.cabin "luxury" is not economy, premium or business |
| 3 | book_flight | $.passenger_name required but missing |
| 4 | issue_refund | unknown tool: never declared |
| 5 | book_flight | arguments are not valid JSON (cut off at character 62) |
| 9 | (output) | $.total_price missing; $.currency "eur" does not match ^[A-Z]{3}$ |
| 10 | (output) | prose where JSON was required |
Patterns to review (not blocking): get_booking was called 3 times with the same arguments (a loop, or polling a status?), and cancel_booking was retried unchanged after the tool returned an error.
Not checked: the format: email keyword of book_flight, listed rather than assumed.
Verdict: do not ship this version. Declare or remove issue_refund, make the date format, cabin values and required passenger name explicit in the tool definitions, find why argument JSON is cut off, and make the trip summary follow its schema. Then audit the next version's logs: the included fixed logs pass (7 calls, 3 outputs, no finding).
Connects securely to your tools. The creator never sees your data.
About this skill
The problem
Agents fail quietly where the model meets your tools: a tool that does not exist, a date sent as a number, a required field missing, argument JSON cut off mid-string, a JSON answer without the field your code reads. Each one becomes an error, a wrong action or a silent retry, and most teams find out from a user.
What Tool Call Auditor does
It reads your agent's real logs and checks every tool call and every structured output against the schema it was declared with, using a real program (scripts/audit.py, Python standard library only). The same logs always give the same findings.
- Contract violations (they fail the gate): unknown or hallucinated tools, arguments that are not valid JSON, schema violations with the JSON path and the rule (missing required field, wrong type, value outside the enum, pattern, bounds, undeclared property and more), and final answers that are not JSON or break their declared schema.
- Patterns to review (they do not fail the gate by default): the same call made three times or more, a call retried unchanged after an error, a call left without a result, a result without a call. These can be real loops and blind retries, or legitimate polling and deliberate retries, so they are listed separately for a person to judge. Make any of them blocking with
--fail-onif your workflow treats it as an error. - Log formats: OpenAI Chat Completions and Responses API, Anthropic Messages, and chat transcripts, in JSONL or JSON. Tool definitions come from the logs or from an OpenAI, Anthropic or MCP tool list. Parallel calls, legacy function calls and multiple choices are handled.
- CI gate: exit code 0 (PASS) or 1 (FAIL), Markdown and JSON reports with a per-tool table, and JUnit XML.
Fails closed
Calls with no tool definition to check against, logs where nothing could be audited, and an empty or unknown gate setting all fail. Schema keywords the audit does not check (for example format) are listed under "Not checked" in every report: nothing is assumed valid.
What you get
scripts/audit.py: the audit and the gate. Python 3.9+, standard library only. No install, no account, no API key.SKILL.md: the workflow your agent follows, from collecting logs to fixing the cause.reference/checks.md: log shapes, how results are matched to calls, every check and rule, gate rules and report fields.- A reproducible demo (
examples/demo.py) on synthetic logs, with the reports it produces. - 78 automated tests, run on Linux and Windows with Python 3.9 and 3.13. macOS has not been verified.
Limits
- It checks the contract, not judgement: it does not tell whether a call was the right action or whether an answer is correct.
- It checks a subset of JSON Schema; other keywords are reported as not checked.
- Repeats and retries are detected only for identical arguments, and tool errors only in common formats.
Privacy
Runs locally and sends nothing anywhere. Reads only the log and schema files you name and writes only the report files you name. Report excerpts are at most 80 characters, with keys, tokens, credentials, emails, card numbers and international phone numbers masked; --no-values leaves values out entirely.
Not affiliated with Agensi, Anthropic or OpenAI. Built by AGI Tools.
It checks each call and output against its declared schema; it does not judge whether a call was the right action or whether an answer is correct.
JSON Schema subset: keywords such as format, if/then and remote $ref are reported as not checked, not validated.
Repeated calls and retries are detected only when the arguments are identical; tool errors are recognized in common formats only.
Masking in report excerpts covers the listed formats; other personal data is not detected (use --no-values).
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 buying a skill.
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
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 7 days ago
- Software
Python 3.9+
Exported logs of your agent (JSONL or JSON). The skill itself needs no model access and no API key.
Permissions
File Scopes
Reads only the log, tool-definition and schema files you name. Writes only the report folder and JUnit file you name. The audit script makes no network calls, starts no processes and never executes log content (the demo runs it as a subprocess). Environment Variables: only the optional SOURCE_DATE_EPOCH, which pins the report timestamp.
What's inside
Frequently Asked Questions
New in Testing & Debugging
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for Testing & Debugging.