compact_json_and_api
Reduces large JSON, database, or OpenAPI/Swagger payloads to inferred typed schemas with field ranges, enums, and samples, cutting token usage by 75–92%.
Instructions
Deterministically compact huge JSON payloads, DB query dumps, or OpenAPI 3.x/Swagger specs into an inferred typed schema with field cardinality, numeric min/max ranges, enum distributions, and a trimmed sample item (75-92% token reduction).
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": {
"payload": "<payload>"
},
"name": "compact_json_and_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | JSON string or JSON object/array (including OpenAPI 3.x / Swagger specs). | |
| maxDepth | No | Max object nesting depth to expand (1..6, default: 4). |