# LLM Tool Call Validator with Auto-Fix

> LLM Tool Call Validator with Auto-Fix is a paid API for AI agents from api.strale.io, paid per call via x402, $0.054001/call, not verified (last probed 2026-10-10); live alternatives: dev-toolkit.agentutil.net Skill Discovery ($0.001) and agent402.tools Query String Parser/Builder ($0.001).

Agents call it through Zero, which pays per call: no API key and no wallet of your own. New accounts start with $5.

Live alternatives for the same use case:
- [dev-toolkit.agentutil.net Skill Discovery](https://www.zero.xyz/c/dev-toolkit-agentutil-net-27ba8110) ($0.001)
- [agent402.tools Query String Parser/Builder](https://www.zero.xyz/c/agent402-tools-query-string-parser-builder-bb2211a2) ($0.001)

Validates an LLM tool call against a JSON Schema and auto-fixes common type mismatches like string-to-number coercions

## Facts

- Endpoint: GET https://api.strale.io/x402/tool-call-validate?utm_source=zero.xyz
- Price: $0.054001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-strale-io-42abd3f2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_DgIYhS5VCve65SAmq6HLp

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability api-strale-io-42abd3f2
```

Example prompt: Validate this tool call for 'create_order' — the input is {"quantity": "3", "price": "9.99", "item_id": 42} — against the schema {"type":"object","properties":{"quantity":{"type":"integer"},"price":{"type":"number"},"item_id":{"type":"integer"}}} and auto-fix any type mismatches like strings that should be numbers.

## When to prefer this

Use this endpoint when an AI agent has generated a tool call and you need to verify it conforms to the declared schema before execution, especially when you want automatic coercion of common LLM type mistakes (e.g. outputting '42' instead of 42). Ideal for agentic pipelines where LLM outputs are fed directly into typed function calls and you need a lightweight guardrail without writing custom validation logic.

## Known failure modes

- Missing required query params (tool_name, tool_input, or expected_schema) returns 400 error
- Malformed JSON in tool_input or expected_schema causes parse error
- Schema itself is invalid JSON Schema — may return validation failure or error
- Type mismatch that cannot be auto-fixed (e.g. non-numeric string where number required) returns validation failure with error details
- Payment failure or insufficient USDC balance returns 402

## How this service works

Validate an LLM tool call against a JSON Schema. Auto-fixes type mismatches (string '42' → number 42). Algorithmic.

## Output

Returns a validation result indicating whether the tool call is valid, along with an auto-fixed version of the tool input where type mismatches (e.g. string '42' coerced to number 42) have been corrected, plus a list of any errors or corrections applied.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "tool_name": "create_order",
   "tool_input": {
    "price": "9.99",
    "item_id": 42,
    "quantity": "3"
   },
   "expected_schema": {
    "type": "object",
    "properties": {
     "price": {
      "type": "number"
     },
     "item_id": {
      "type": "integer"
     },
     "quantity": {
      "type": "integer"
     }
    }
   }
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "tool_name",
      "tool_input",
      "expected_schema"
     ],
     "properties": {
      "tool_name": {
       "type": "string"
      },
      "tool_input": {
       "type": "object"
      },
      "expected_schema": {
       "type": "object"
      }
     }
    }
   },
   "additionalProperties": false
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-strale-io-42abd3f2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.strale.io](https://www.zero.xyz/host/api.strale.io/llms.txt)
