Skip to main content
Glama

WritersLogic verifiable AI agents

openapi-slice

Slice one operation out of an OpenAPI 3.0 or 3.1 document with every component it needs — Extracts one operation (path plus HTTP method, matching templated paths like /pets/{id}) from an OpenAPI 3.0.x or 3.1.x document, given as JSON, YAML or a parsed object, and returns a smaller valid OpenAPI document holding that operation, its path-level parameters and servers, and the transitive closure of every local $ref it uses: schemas, parameters, requestBodies, responses, headers, examples,

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": {
      "path": "<path>",
      "method": "<method>"
    },
    "name": "openapi-slice"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesConcrete or templated path, e.g. /pets/{petId} or /pets/42.
specNoThe OpenAPI document as a JSON object (use specText for YAML).
methodYes
specTextNoThe OpenAPI document as JSON text (up to 400000 characters) or YAML text (up to 50000 characters).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources