Agent Tool Schema Lint
Tool definitions agents can actually use.
A model only sees a tool's name, description and argument schema. "Get order" with an undocumented id gives it almost nothing to go on. This guide lints two tool definitions from a small order API and shows what to fix first.
This is the exact input and an excerpt of the report Agent Tool Schema Lint returns for it. The full report also carries input and report SHA-256 hashes for verification.
{
"tools": [
{
"name": "get_order",
"description": "Get order",
"inputSchema": {
"type": "object",
"properties": {
"id": {
"type": "string"
}
}
}
},
{
"name": "cancel_order",
"description": "Cancel one unshipped order by its id and return the refund amount in cents. Shipped orders are rejected.",
"inputSchema": {
"type": "object",
"properties": {
"orderId": {
"type": "string",
"description": "Order id, e.g. A-1042"
},
"notify": {
"type": "boolean"
}
},
"required": [
"orderId"
],
"additionalProperties": false
}
}
]
}{
"totals": {
"error": 0,
"warning": 3,
"info": 1
},
"tools": [
{
"name": "get_order",
"format": "mcp",
"score": 83,
"errors": 0
},
{
"name": "cancel_order",
"format": "mcp",
"score": 92,
"errors": 0
}
],
"findings": [
{
"tool": "get_order",
"severity": "warning",
"code": "short_description",
"path": "/description",
"message": "Descriptions under 40 characters rarely tell a model when to pick this tool over another."
},
{
"tool": "get_order",
"severity": "info",
"code": "open_object",
"path": "/inputSchema",
"message": "additionalProperties is not false; OpenAI strict mode requires it, and closed objects stop invented arguments."
},
{
"tool": "get_order",
"severity": "warning",
"code": "undocumented_property",
"path": "/inputSchema/properties/id",
"message": "Add a description: units, format and an example value help the model fill it correctly."
},
{
"tool": "cancel_order",
"severity": "warning",
"code": "undocumented_property",
"path": "/inputSchema/properties/notify",
"message": "Add a description: units, format and an example value help the model fill it correctly."
}
]
}No account is needed to pay: an agent with its own wallet answers the HTTP 402 quote, or a human approves each payment through the local Agent Spend bridge. Payment settles before delivery; there is no automatic refund.
get_order scores 83: its nine-character description cannot tell a model when to use it, its id argument has no description, and its object is open, so a model may invent extra arguments. cancel_order scores 92; only its notify flag lacks a description.
Every finding has a severity, a code and a JSON-pointer path such as /inputSchema/properties/id, so you can fix definitions in code without guessing which field is meant.
Mark an OpenAI function with strict: true and the lint applies the structured-output rules: every property must be required and objects must set additionalProperties: false. Without strict, open objects are reported as information, not as errors.
It also flags names clients reject (anything outside letters, digits, underscores and hyphens, up to 64 characters), duplicate names, required fields with no definition, untyped values and nesting deeper than five levels.
Run it in CI before publishing an MCP server or a new tool version, and after generating tool schemas from an OpenAPI document. The lint never calls the tools; it reads definitions only.
MCP tools (inputSchema), OpenAI functions ({type: "function", function: {...}} or {name, parameters}) and Anthropic tools (input_schema), mixed in one call.
Up to 128 tools within 128 KiB, with up to 500 findings and explicit truncation.
No. It is a heuristic for ordering fixes. Provider rules change; test with the clients you support.
0.022223 USDC per call on Base mainnet, including the platform fee. The exact 402 quote is authoritative.
Tool definitions agents can actually use.
A local MCP bridge that proposes each paid call and waits for you to approve it.
Replace API keys, JWTs, emails, card numbers, IPs and phone numbers in logs with consistent placeholders before an agent pastes them into a model, a ticket or a vector store.
Split documentation into retrieval chunks that keep their heading path, never cut a fenced code block and carry stable ids and line ranges for citations.
Check a batch of raw model outputs against one JSON Schema and get the valid rate, the outputs that needed repair, and the exact paths and rules that fail most often.