Skip to main content
Glama

slice_openapi

Read-only

Index or extract matching operations and their schemas from large OpenAPI documents so agents can inspect only needed API details and save tokens.

Instructions

Read a large OpenAPI document cheaply: with no filters you get an index of operations; with filters you get only the matching operations and the schemas they use.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "slice_openapi"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile to read, inside the server's root folder. Preferred way to pass input.
tagsNoOnly operations with one of these tags.
textNoThe text itself. Only for small inputs: large text costs tokens to send.
indexNoList operations only, no details.
pathsNoPath patterns such as /repos/*/issues*.
commandNoA command to run and trim (no shell). Only works if started with --allow-run.
methodsNoOnly these HTTP methods.
operation_idsNoOnly these operation ids.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description reinforces safety and token economy ('read cheaply'). However, it is silent on the schema's `command` parameter, which can execute a process — an agent reading only the description would be unaware this tool is not purely a file reader.

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?

A single front-loaded sentence with two parallel clauses; the mode distinction is stated first and nothing is redundant.

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?

An output schema exists so return values need no explanation, and the core index/filter behavior is covered. What is missing is material for an eight-parameter tool: the `command` execution path, the input-vs-file trade-off, and any indication of result size or truncation.

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 coverage is 100%, so all eight parameters are already documented, establishing the baseline of 3. The description adds the useful consequence that filtering returns 'the schemas they use', but it names no parameters and leaves a mild tension with `index` defaulting to false while the prose says no filters yields an index.

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 gives a specific verb and resource ('Read a large OpenAPI document') plus the two operating modes (index with no filters, filtered operations plus their schemas). It is clearly distinguishable from the trim/expand siblings by resource, though it never names an alternative to route against.

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

Usage Guidelines4/5

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

It implies a progressive-disclosure workflow: call with no filters to survey operations, then re-call with filters to pull details. That is real usage context, but there are no explicit when-not conditions and no mention of the path-vs-text choice the schema calls 'preferred'.

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