Skip to main content
Glama

openapi_query

Read-onlyIdempotent

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

NameRequiredDescriptionDefault
codeYesJavaScript expression or function body evaluated against spec, e.g. spec.paths['/users']?.get?.responses.
rootNoWorkspace for this query. When a server root is configured, this path must remain within it.
max_bytesNoUTF-8 budget for successful query JSON (default: 16384).
spec_pathNoOptional path to the OpenAPI spec inside the selected workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds genuine context beyond that: the spec is "resolved" (refs already inlined) and evaluation is "synchronous JavaScript." It does not disclose execution constraints an agent would care about for a code-evaluation tool, such as error/throw behavior, timeouts, or what context the code runs in.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no filler, and the core purpose plus the two usage modes are front-loaded. Every clause carries information; nothing repeats the title or the schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With a full schema and complete annotations, the safety and input story is adequate, and the description covers the two query modes. What is missing is behavioral completeness for a JavaScript-evaluation tool: the description never states the result shape of the evaluated expression, what happens when the expression throws, or what bindings (e.g., `spec`) are in scope beyond the schema's single example.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so all four parameters are documented in the schema itself, including the code example, the root containment rule, and the max_bytes default. The description adds no parameter-level detail beyond naming the kinds of things code can target, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (query) and resource (the resolved, read-only OpenAPI spec) and distinguishes two modes: inspecting the default endpoint index versus targeting a path, request schema, or response schema. It is clear on its own; the only thing keeping it from a 5 is the absence of any sibling to contrast against, which the rubric requires for that score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

"Inspect the default endpoint index or query a specific path, request schema, or response schema" implies how the tool is used and hints at a discovery-then-drill-down workflow. However, there is no explicit when-to-use statement, no prerequisites (e.g., that a spec must be loaded first), and no guidance on when another approach is preferable.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools