Skip to main content
Glama

docs_add_swagger

Import API documentation from a Swagger UI page by detecting its OpenAPI spec URL automatically. Use when given URLs like /swagger or /api-docs.

Instructions

Import documentation from a Swagger UI page. Automatically detects the OpenAPI spec URL by trying common patterns. Use this when you have a Swagger UI URL like /swagger or /api-docs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe Swagger UI page URL (e.g., "https://api.example.com/swagger")
nameNoOptional: display name for the API documentation
sourceIdNoOptional: custom source ID (auto-generated from API title if not provided)
descriptionNoOptional: description for the source

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations provided, the description carries the full behavioral burden. It discloses the auto-detection of the spec URL, which is genuinely useful behavior, but says nothing about side effects, idempotency, what happens if detection fails, whether an existing source is overwritten, or permission/auth requirements. For a mutation/import tool, this is a significant gap.

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?

Three short sentences, zero filler. The primary action is front-loaded, the auto-detection behavior follows, and the usage cue closes. Every sentence earns its place.

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

Completeness3/5

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

For a mutation tool with no annotations and no output schema, the description is thin. It covers purpose, the detection behavior, and a usage hint, but omits side effects, failure handling, and auth needs. Adequate to trigger the right call, not enough to predict outcomes.

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 four parameters with examples and optionality. The description adds no parameter-level detail beyond what the schema provides, so the baseline 3 is appropriate.

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?

States a specific verb+resource: 'Import documentation from a Swagger UI page.' This clearly distinguishes it from siblings like docs_add_url, docs_add_sitemap, and docs_add_openapi, which target other source types. It could be sharper about what 'import' produces (a source? a doc set?) but the purpose is unambiguous.

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?

Gives an implied usage condition: 'Use this when you have a Swagger UI URL like /swagger or /api-docs.' This helps distinguish it from docs_add_openapi (raw spec), but it does not explicitly state when NOT to use it or name the alternative for when you already have the spec file. The routing is implied rather than explicit.

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