Tool Contract Validator for AI Agents avatar

Tool Contract Validator for AI Agents

Pricing

$1.00 / 1,000 tool validateds

Go to Apify Store
Tool Contract Validator for AI Agents

Tool Contract Validator for AI Agents

An AI tool for agents and developers that checks AI-agent tool definitions (MCP, OpenAI, Anthropic) and reports every contract error with JSON Pointer paths. Pure code: no LLM, no network.

Pricing

$1.00 / 1,000 tool validateds

Rating

0.0

(0)

Developer

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Features

Limited permissions

Share

Checks AI-agent tool definitions and reports every contract error before you ship them. It accepts MCP tools, OpenAI function/tool format, and Anthropic tool format. Validation is pure code: JSON parsing and JSON Schema meta-validation. No LLM, no network, and no proxy.

Input

FieldTypeDefaultRequiredDescription
toolsarray (1–500), or an envelope object—yesTool definitions. Also accepts an MCP tools/list response or { "tools": [...] }.
formatauto | mcp | openai | anthropicautonoauto detects each tool individually.
strictbooleanfalsenoWhen true, style issues (missing or empty tool description, missing parameter descriptions, and similar) are reported as errors instead of warnings.

If tools is missing, not an array (after unwrap), empty, or contains a non-object item, the run fails with a clean input error, writes no dataset items, and charges no events.

Input example

{
"tools": [
{
"name": "get_weather",
"description": "Get current weather for a city.",
"inputSchema": {
"type": "object",
"properties": {
"city": { "type": "string", "description": "City name" }
},
"required": ["city"]
}
}
],
"format": "auto",
"strict": false
}

OpenAI tools use { "type": "function", "function": { "name", "description", "parameters" } }. Anthropic tools use input_schema instead of inputSchema. Mixed batches are allowed when format is auto.

Output

The dataset has one item per tool plus one summary item.

Per-tool item:

  • type: "tool"
  • index, name, detectedFormat (mcp, openai, or anthropic)
  • valid (boolean)
  • errors and warnings: arrays of { "code", "path", "message" }, where path is a JSON Pointer

Summary item:

  • type: "summary"
  • toolsChecked, validCount, invalidCount, duplicateNames
  • format, strict, envelope, durationMs

Output example

For the input example above (a valid MCP tool):

[
{
"type": "tool",
"index": 0,
"name": "get_weather",
"detectedFormat": "mcp",
"valid": true,
"errors": [],
"warnings": []
},
{
"type": "summary",
"toolsChecked": 1,
"validCount": 1,
"invalidCount": 0,
"duplicateNames": [],
"format": "auto",
"strict": false,
"envelope": null,
"durationMs": 40
}
]

durationMs varies by run. This example is from a real run of build 1.0.2.

What is checked

  • Name is present and matches ^[a-zA-Z0-9_-]{1,64}$
  • Names are unique in the batch (duplicates are flagged on each copy)
  • Description is present: missing or empty is a warning by default, and an error when strict is true
  • An input schema is present, is an object schema, and is valid JSON Schema (draft 2020-12 / 07)
  • Every required key exists in properties
  • type values are valid
  • enum is non-empty
  • $ref values resolve
  • Format-specific wrapper fields are correct (inputSchema vs parameters vs input_schema)

Pricing

Pay per event: tool-validated at $0.001 per tool definition checked.

Runs that fail input validation are not charged this event. The Actor's default run size is 256 MB.

Limits

  • 1 to 500 tool definitions per run
  • Default timeout 60 seconds, default memory 256 MB

Privacy

This Actor uses limited permissions. It does not call the network to fetch or execute tools; it only inspects the definitions you pass in.