Skip to main content
Glama

Import OpenAPI

import_openapi
Destructive

Import an OpenAPI 3.x / Swagger 2.0 spec as a set of custom HTTP tools — one tool per operation, filed under a single group. Pass the spec text (JSON or YAML). Use this instead of hand-writing many create_http_tool calls when the user supplies a spec.

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": {
      "spec_text": "<spec_text>"
    },
    "name": "import_openapi"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupNoGroup name (default: the spec's title)
base_urlNoOverride the spec's server base URL
spec_textYesThe raw OpenAPI spec, JSON or YAML
tags_jsonNoOptional JSON object of operation name → tags, only for an operation riskier than its method says, e.g. '{"send_invoice": {"destructive": true}}'. Tags: read_only, destructive, idempotent, open_world. Each operation otherwise takes its method's tags.
name_prefixNoPrefix for every generated tool name, to avoid collisions

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the safety profile is covered. The description adds genuinely useful behavior beyond that — bulk decomposition into one tool per operation, group filing, and the tags_json override for operations riskier than their HTTP method implies. It stops short of saying what happens on invalid specs or duplicate/re-imported tool names, which is notable given idempotentHint=false.

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 with zero padding. The capability and its scope are front-loaded, and the alternative-tool routing follows immediately, which is the right information order for an agent scanning definitions.

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

Completeness4/5

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

For a bulk-creation tool with no output schema, the description covers input shape, resulting tool structure, and risk tagging well enough to call it correctly. It could have closed the loop on the return value (count or list of created tools) and failure behavior on malformed specs, which is the only real gap.

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 the schema already documents all five parameters in detail, including the tags vocabulary and defaults. The description only reinforces the spec text format (JSON or YAML) and adds no syntax or format guidance for group, base_url, or name_prefix. Baseline 3 applies when structured fields do the heavy lifting.

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

Purpose5/5

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

The description opens with a specific verb and resource ('Import an OpenAPI 3.x / Swagger 2.0 spec') and states the resulting artifact precisely: one custom HTTP tool per operation, grouped together. This is clearly distinguishable from create_http_tool, which it names as the manual alternative.

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

Usage Guidelines5/5

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

It gives an explicit selection rule: use this instead of hand-writing many create_http_tool calls when the user supplies a spec. The condition that selects this tool over the sibling is stated directly, leaving nothing to inference.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.