Skip to main content
Glama

APIMock

Import an OpenAPI spec

import_openapi
DestructiveIdempotent

Import an OpenAPI/Swagger spec (v2, v3.0, v3.1; JSON or YAML) into a workspace, generating one mock endpoint per operation with responses taken from the spec's examples. Clean CRUD path-groups become live stateful Resources (with inferred fields and seed records) served at the spec's own paths, instead of static endpoints. Provide either spec (the raw text) or url. Generated objects are placed in a folder named after the spec; re-importing the same spec reconciles instead of duplicating.

Input Schema

NameRequiredDescriptionDefault
urlNoURL to fetch the spec from. Provide this or `spec`.
specNoRaw spec text (JSON or YAML). Provide this or `url`.
workspaceYesWorkspace slug (from list_workspaces).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and openWorldHint=true. The description adds real value by explaining the reconciliation-not-duplication behavior (supporting idempotency) and the folder-naming/output structure, but with destructiveHint=true it never says what existing endpoints or resources might be overwritten or removed on re-import, leaving the most consequential behavior unexplained.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core action and supported spec versions/formats, then layers generation semantics. The second sentence is dense, but every clause carries distinct information (Resources vs. static endpoints, folder placement, reconciliation) rather than padding.

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 fairly complex generative tool with no output schema, the description covers what is produced, where it is placed, and how re-imports behave — enough for correct invocation. It stops short of detailing error/partial-import behavior or the destruction semantics implied by the annotations.

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 three parameters including the `spec`/`url` mutual exclusivity. The description restates that either input is accepted but adds no format or syntax detail beyond what the schema provides, so baseline 3 applies.

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?

Names a specific verb and resource (import an OpenAPI/Swagger spec into a workspace) and enumerates exactly what it produces: one mock endpoint per operation, plus stateful Resources for clean CRUD path-groups. This distinguishes it from siblings like create_endpoint, create_resource, and scaffold_backend without needing to open any schema.

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 clearly frames when to use it (bulk-generating endpoints from an existing spec) and gives the input-selection rule ('Provide either `spec` (the raw text) or `url`'), plus re-import behavior. It does not explicitly name alternative siblings for when a spec import is the wrong choice, which is the only gap.

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.

Resources