Tool Call Validation

Check supported schema rules for a tool call and repair common type mismatches. Returns validation errors and corrected input.

Pay by wallet (x402) tool-call-validate

Example

Example answer
{
  "valid": true,
  "errors": [],
  "tool_name": "test",
  "error_count": 0,
  "corrected_input": null,
  "corrections_applied": null
}

Inputs

FieldTypeRequiredWhat it is
tool_namestringYes—
tool_inputobjectYes—
expected_schemaobjectYes—

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
validbooleanAlways (present in every successful answer)
errorsarrayAlways (present in every successful answer)
corrected_inputobjectUsually (present for most inputs)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "tool-call-validate",
    "inputs": {
      "tool_name": "search",
      "tool_input": {
        "limit": "10",
        "query": "test"
      },
      "expected_schema": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "number"
          },
          "query": {
            "type": "string"
          }
        }
      }
    },
    "max_price_cents": 5
  }'

Limitations

  • Parameter meaning and correctness are not checked

    Validates tool call structure and parameter types — cannot verify whether parameter values are semantically correct

    What to do instead: Combine with runtime testing against the actual tool to verify that parameter values produce expected results