infer_schema
Infer a JSON Schema (draft 2020-12) from an example JSON value. Free and deterministic. Set as_samples=true when the input is an array of example objects of the same shape to merge them into one schema. Turns sample agent/tool output into a reusable schema.
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": {
"input": "<input>"
},
"name": "infer_schema"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes | A JSON value (or array of samples) to infer a schema from | |
| as_samples | No | Treat a top-level array as multiple samples of one shape |