openapi_query
Query a resolved, read-only OpenAPI spec with synchronous JavaScript to inspect endpoint indexes or fetch path, request, and response schemas.
Instructions
Query the resolved, read-only OpenAPI spec using synchronous JavaScript. Inspect the default endpoint index or query a specific path, request schema, or response 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": {
"code": "<code>"
},
"name": "openapi_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript expression or function body evaluated against spec, e.g. spec.paths['/users']?.get?.responses. | |
| root | No | Workspace for this query. When a server root is configured, this path must remain within it. | |
| max_bytes | No | UTF-8 budget for successful query JSON (default: 16384). | |
| spec_path | No | Optional path to the OpenAPI spec inside the selected workspace. |