Skip to main content
Glama

Import OpenAPI specification

import_openapi_spec

Generate a Postman v2.1 collection from an OpenAPI or Swagger spec, or sync an existing collection with a newer spec version to keep requests aligned.

Instructions

Generates a Postman v2.1 collection from OpenAPI 3.0/3.1/Swagger 2.0 (JSON/YAML), or syncs an existing collection with a new spec version. Deterministic: uses openapi-to-postmanv2 without a model.

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": {
      "specSource": "<specSource>",
      "outputPath": "<outputPath>"
    },
    "name": "import_openapi_spec"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNocreate: new collection; sync: update an existing collectioncreate
overwriteNoAllow replacing outputPath
outputPathYesPath for the resulting collection
specSourceYesLocal path (.json/.yaml/.yml) or https URL to an OpenAPI/Swagger spec
folderStrategyNoHow to group items into foldersTags
baseUrlVariableNoCollection variable name for the base URLbaseUrl
collectionSourceNoCollection to sync (required when mode=sync)
includeDeprecatedNoInclude deprecated operations
generateBasicTestsNoAdd deterministic contract tests
parametersResolutionNoUse spec examples or generate values from schemasExample
deleteOrphanedRequestsNoSync only: remove requests absent from the spec

Output Schema

NameRequiredDescriptionDefault
modeYes
specYes
syncNo
foldersYes
warningsYes
variablesYes
outputPathYes
totalItemsYes
validationYes
testsGeneratedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare a write operation (readOnlyHint=false) and network access (openWorldHint=true); the description usefully adds that conversion is deterministic via openapi-to-postmanv2 with no model involvement. However, it does not warn that the tool writes to disk, that overwrite replaces outputPath, or that sync mode with deleteOrphanedRequests removes requests — the riskiest behaviors are left to parameter names.

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, front-loaded with the primary action, and the second sentence adds a genuinely non-obvious behavioral fact (determinism, no model) rather than filler. Nothing is redundant.

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?

With an output schema present and full schema coverage plus annotations, the description does not need to explain return values. It covers source formats, modes, and determinism; the remaining gap is around write/destructive side effects of overwrite and orphan deletion, which matters for an 11-parameter mutation tool.

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% with 11 well-documented parameters including defaults and enums, so the schema carries the semantic load. The description adds only the set of accepted spec formats/versions, which slightly extends the specSource documentation but does not explain mode-specific requirements such as collectionSource.

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 states a specific verb and resource ("Generates a Postman v2.1 collection") and covers both operating modes plus the supported input formats (OpenAPI 3.0/3.1/Swagger 2.0, JSON/YAML). It does not explicitly name a sibling to differentiate from, but the generation purpose is unambiguous against the newman/validation siblings.

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?

The contrast between generating a new collection and syncing an existing one implies when each mode applies, but the description never explicitly says when to choose this tool over alternatives such as inspect/validate, nor does it mention prerequisites or follow-up steps. Guidance is inferable but not stated.

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