Skip to main content
Glama

import_api_spec

Import an OpenAPI 3.x document (as JSON), a Postman v2.x collection (JSON) or a curl command into a new collection, or into collection_id. All or nothing, and plan limits are checked first. Credentials are never imported (they become variables). Convert YAML to JSON before sending.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName for the new collection.
formatYes
contentYesThe document (object or JSON string), or the curl command.
collection_idNoAdd to this collection instead of creating one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / format / enum
      Previous value: -[
      -  "openapi",
      -  "postman",
      -  "curl"
      -]New value: +[
      +  "openapi",
      +  "postman",
      +  "har",
      +  "curl"
      +]
  2. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations indicate readOnlyHint: false, destructiveHint: false, but do not convey the mutating nature of the operation. The description adds value by stating that credentials are never imported (they become variables) and that the operation is all-or-nothing with plan limits checked first. These are critical behaviors not captured in annotations. However, it doesn't mention what happens to existing collection contents when adding to one, or whether it overwrites.

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?

The description is three sentences, each adding essential information. It doesn't waste words, front-loads the formats and target, then covers key constraints (all-or-nothing, plan limits, credential handling, YAML conversion). Efficient and well-organized.

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?

Given the absence of an output schema and moderate parameter coverage, the description covers the essentials: formats, target, safety behavior, and prerequisites. It doesn't describe return values, but that might be less critical for a mutating tool. It could benefit from mentioning error paths (e.g., plan limit failure), but it does hint at that. Overall, adequate.

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

Parameters4/5

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

The schema covers 75% of parameters, but the description adds meaning beyond the schema: it clarifies that 'content' can be a document or curl command, and that 'collection_id' is optional since a new collection can be created. It also explains that credentials become variables. This supplements the schema's sparse descriptions.

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 clearly states the tool imports OpenAPI 3.x, Postman v2.x, or curl into a new or existing collection. It names the specific input formats and the target collection, distinguishing it from sibling tools like create_api_collection which likely creates an empty collection. It is a specific verb+resource with clear scope.

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?

The description explains when to use this tool (for importing API specs) and mentions that YAML must be converted to JSON, which is a key prerequisite. However, it doesn't explicitly contrast with alternatives like upsert_api_endpoint or create_api_collection, but the focus on importing external specs is clear enough.

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.