suggest_contract_fix
Validate a JSON payload against a Zod schema and get suggested fixes for each violation, explaining why validation fails and how to correct it.
Instructions
Validate a JSON payload against a Zod schema and suggest fixes for each violation. Use to answer: why does this payload fail validation, and how do I fix it?
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"schema_code": "<schema_code>",
"payload": "<payload>"
},
"name": "suggest_contract_fix"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | JSON string of the failing payload | |
| schema_code | Yes | Zod schema code |