Skip to main content
Glama
anuoua

swagger-doc-explorer-mcp

by anuoua

Swagger Doc Explorer MCP

MCP server for progressive exploration of Swagger/OpenAPI documentation. Supports stdio (local) and HTTP (remote) transports.

Each loaded spec is identified by a unique name ({title} v{version}) assigned at load time. All downstream tools reference the spec by name, so you can load and inspect multiple specs simultaneously.

Tools

Tool

Description

swagger_load_spec

Load spec from a remote URL. url (required), auth_header (optional). Returns the assigned spec_name

swagger_load_local_spec

Load spec from a local JSON file. file_path (required). Returns the assigned spec_name

swagger_list_loaded

List all specs currently loaded (name, title, version, source)

swagger_remove_spec

Remove a loaded spec from memory. spec_name (required)

swagger_get_info

Get API title, version, description, server URL. spec_name (required)

swagger_list_tags

List all tags/groups with endpoint counts. spec_name (required)

swagger_list_paths

List endpoints, optionally filtered by tag. Supports limit (default 50) and offset pagination. spec_name (required)

swagger_get_endpoint

Drill into a specific endpoint: path, method. spec_name (required)

swagger_get_endpoint_full

Drill into endpoint with all $ref recursively resolved. Single-call completeness

swagger_list_schemas

List all data models/schemas. Supports limit and offset. spec_name (required)

swagger_get_schema

Get full details of a specific schema: schema_name. spec_name (required)

swagger_search

Full-text search across endpoints and schemas: query. spec_name (required)

Related MCP server: magento-api-mcp

Installation

npm install -g swagger-doc-explorer-mcp

Or use directly with npx (no install needed):

npx -y swagger-doc-explorer-mcp

Usage

stdio (default)

npx -y swagger-doc-explorer-mcp

HTTP

SWAGGER_HTTP_PORT=3000 npx -y swagger-doc-explorer-mcp

The HTTP server accepts POST requests at / following the MCP Streamable HTTP protocol. Clients must include Accept: application/json, text/event-stream and use the mcp-session-id header for session affinity:

# Initialize session
curl -X POST http://localhost:3000/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"my-client","version":"1.0"}}}'

# Copy the mcp-session-id from response headers, then:
curl -X POST http://localhost:3000/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: <session-id>" \
  -d '{"jsonrpc":"2.0","method":"notifications/initialized"}'

curl -X POST http://localhost:3000/ \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -H "mcp-session-id: <session-id>" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"swagger_load_spec","arguments":{"url":"https://petstore.swagger.io/v2/swagger.json"}}}'

Development

npm run dev          # stdio mode with hot reload
npm run dev:http     # HTTP mode on port 3000 with hot reload

MCP client configuration

Use npx so the client auto-installs the package:

Claude Desktop (claude_desktop_config.json):

{
  "mcpServers": {
    "swagger-doc-explorer": {
      "command": "npx",
      "args": ["-y", "swagger-doc-explorer-mcp"]
    }
  }
}

VS Code (.vscode/mcp.json):

{
  "servers": {
    "swagger-doc-explorer": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "swagger-doc-explorer-mcp"]
    }
  }
}

If installed globally, use swagger-doc-explorer-mcp directly as the command.

opencode (~/.config/opencode/opencode.json):

{
  "mcp": {
    "swagger-doc-explorer": {
      "type": "local",
      "command": ["npx", "-y", "swagger-doc-explorer-mcp"],
      "enabled": true
    }
  }
}

Environment Variables

Variable

Description

SWAGGER_HTTP_PORT

Set to enable HTTP mode (e.g. 3000). Omit for stdio mode

Progressive Exploration Workflow

1. swagger_load_spec / swagger_load_local_spec  → load the API spec (returns spec_name)
2. swagger_get_info(spec_name="...")             → overview of the API
3. swagger_list_tags(spec_name="...")            → see available groups
4. swagger_list_paths(spec_name="...", tag="users") → browse endpoints in a group
5. swagger_get_endpoint(spec_name="...", path, method) → drill into endpoint details
6. swagger_list_schemas(spec_name="...")         → see available data models
7. swagger_get_schema(spec_name="...", schema_name) → inspect a model
8. swagger_search(spec_name="...", query)        → find anything across the spec

Multiple specs can be loaded and queried simultaneously — each identified by its unique spec_name.

Compatibility

  • OpenAPI v3.x (openapi field)

  • Swagger v2 (swagger field)

  • JSON format only (YAML is not supported)

  • Remote URLs and local file paths

Build & Test

npm run build
npm test

Available Tools

12 tools
swagger_get_endpointGet Endpoint DetailsA
Read-onlyIdempotent

Get detailed information about a specific API endpoint, including parameters, request body, responses, and security requirements.

Use this tool after swagger_list_paths to drill down into a specific endpoint's complete details.

Args:

  • spec_name (string): Name of the previously loaded spec

  • path (string): URL path of the endpoint (e.g., "/pets/{petId}")

  • method (string): HTTP method (get, post, put, patch, delete, options, head)

Returns: Full endpoint details with parameters, request body, responses, and security.

Examples:

  • Use when: "Show me the details of GET /pets/{petId}" -> params with spec_name="", path="/pets/{petId}", method="get"

  • Use when: "What parameters does the create user endpoint take?" -> params with spec_name="", path="/users", method="post"

Error Handling:

  • Returns error if the spec name has not been loaded

  • Returns error if the path or method is not found, with suggestions

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesURL path of the endpoint (e.g., '/pets/{petId}', '/users', '/store/order'). Must start with '/'.
methodYesHTTP method (get, post, put, patch, delete, options, head)
spec_nameYesName of the previously loaded OpenAPI/Swagger spec (use swagger_list_loaded to see available names)

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the safety profile is known. The description adds useful behavioral context about error handling: it returns errors if the spec is not loaded or if the path/method is not found, with suggestions. This goes beyond the annotations and helps the agent anticipate failure modes.

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 well-organized into clear sections: purpose, usage context, Args, Returns, Examples, and Error Handling. It is front-loaded with the main purpose, and every section provides necessary information without unnecessary flourish. The length is justified by the richness of detail, making it easy to scan.

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

Completeness5/5

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

With 3 required parameters, no output schema, and moderate complexity, the description covers all necessary context: what the tool returns, when to use it, examples of concrete usage, and error handling. It also notes the prerequisite that a spec must be loaded, which is essential for the tool to function. Overall, it gives the agent a complete picture.

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?

Schema coverage is 100% and every parameter has a description in the schema, so the baseline is 3. The description adds value by repeating parameter definitions in an Args section and, more importantly, by providing examples that show how to map natural language requests to spec_name, path, and method. These examples clarify parameter usage beyond the schema.

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 clearly states the tool 'gets detailed information about a specific API endpoint' including parameters, request body, responses, and security. It distinguishes from swagger_list_paths by mentioning it is used after listing paths, but does not differentiate from the closely named sibling swagger_get_endpoint_full, which could confuse an agent selecting between the two.

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 explicitly says to use this tool after swagger_list_paths to drill down into a specific endpoint's complete details. It provides concrete examples of user intents and parameter mapping. However, it does not mention any alternatives or when NOT to use this tool (e.g., when swagger_get_endpoint_full would be more appropriate), so it lacks explicit exclusions.

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

swagger_get_endpoint_fullGet Endpoint Details (All $ref Resolved)A
Read-onlyIdempotent

Get detailed information about a specific API endpoint with all schema references ($ref) recursively resolved.

Unlike swagger_get_endpoint, this tool resolves every $ref into its full schema definition. Parameters, request body schemas, and response schemas are expanded inline with no external references. Circular references are detected and marked.

Use this when you need the complete endpoint definition in a single call, without needing to follow $ref links manually.

Args:

  • spec_name (string): Name of the previously loaded spec

  • path (string): URL path of the endpoint (e.g., "/pets/{petId}")

  • method (string): HTTP method (get, post, put, patch, delete, options, head)

Returns: Full endpoint details with all $ref resolved recursively.

Examples:

  • Use when: "Show me everything about GET /pets/{petId} with all schemas expanded" -> params with spec_name="", path="/pets/{petId}", method="get"

  • Use when: "Give me the full request body schema for creating a user" -> params with spec_name="", path="/users", method="post"

Error Handling:

  • Returns error if the spec name has not been loaded

  • Returns error if the path or method is not found, with suggestions

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesURL path of the endpoint (e.g., '/pets/{petId}', '/users', '/store/order'). Must start with '/'.
methodYesHTTP method (get, post, put, patch, delete, options, head)
spec_nameYesName of the previously loaded OpenAPI/Swagger spec (use swagger_list_loaded to see available names)

TDQS

A4.9/5.0
Behavior5/5

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

The description discloses behavioral details beyond annotations: it resolves all $refs recursively, detects and marks circular references, and returns errors for missing specs or invalid paths/methods with suggestions. Annotations already declare read-only/idempotent safety, and the description adds functional transparency.

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 well-structured with a clear opening statement, followed by contrast, usage guidance, args recap, return description, and error handling. Despite being lengthy, every section adds information—no fluff. It is front-loaded with the core purpose.

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

Completeness5/5

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

For a read-only query tool without an output schema, the description adequately covers expected return, error scenarios, and circular reference behavior. It also provides examples and usage context, making it self-contained for an agent.

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 input schema already provides 100% coverage with descriptions for all three parameters; the description restates them but adds value through examples that map natural language requests to concrete parameter values. The schema itself includes enums and example paths, so the incremental contribution is moderate but useful.

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 provides detailed endpoint information with all $ref resolved recursively, using a specific verb ('Get') and resource ('endpoint details'). It explicitly distinguishes itself from swagger_get_endpoint by highlighting the $ref resolution behavior, making the purpose unambiguous.

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?

The description says 'Use this when you need the complete endpoint definition in a single call, without needing to follow $ref links manually' and provides concrete examples of when to use it. It contrasts with swagger_get_endpoint, effectively guiding selection between alternatives.

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

swagger_get_infoGet API InfoA
Read-onlyIdempotent

Get general information about a loaded OpenAPI/Swagger specification, including title, version, description, server URL, contact info, and license.

Use this tool to get a high-level summary of an API spec.

Args:

  • spec_name (string): Name of the previously loaded spec (use swagger_list_loaded to see available names)

Returns: { "title": string, // API title "version": string, // API version "description": string, // API description "server_url": string, // Base server URL "endpoints": number, // Total endpoint count "schemas": number, // Total schema count "tags": number, // Total tag count "openapi_version": string // OpenAPI spec version }

Examples:

  • Use when: "Tell me about this API" -> params with spec_name=""

  • Use when: "What's the base URL for this API?" -> params with spec_name=""

Error Handling:

  • Returns error if the spec name has not been loaded

ParametersJSON Schema
NameRequiredDescriptionDefault
spec_nameYesName of the previously loaded OpenAPI/Swagger spec (use swagger_list_loaded to see available names)

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true, and the description adds an Error Handling section stating that an error is returned if the spec name has not been loaded. It also provides the full return structure. No contradiction with annotations.

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?

The description is well-organized into Args, Returns, Examples, and Error Handling sections, with the main purpose stated first. It is slightly verbose for a one-parameter tool, but every section earns its place by providing concrete guidance and examples.

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

Completeness5/5

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

For a simple read-only info tool, the description covers purpose, return format, parameter prerequisite, and error behavior. The annotations cover the safety profile. Given the tool's low complexity, there are no significant gaps.

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?

The single parameter `spec_name` is fully described in the schema (100% coverage), and the description's Args section repeats the schema description verbatim, adding no new semantic meaning. Baseline 3 is appropriate because the schema does 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+resource ('Get general information about a loaded OpenAPI/Swagger specification') and lists key fields, clearly distinguishing it from sibling tools that drill into endpoints, schemas, or paths. The phrase 'high-level summary' reinforces its distinct role.

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?

It explicitly states 'Use this tool to get a high-level summary of an API spec' and provides two example user intents ('Tell me about this API', 'What's the base URL'). It also links to the sibling tool `swagger_list_loaded` for finding available spec names. However, it does not mention alternatives for endpoint-specific info or explicitly say when not to use it, so a 4 rather than 5.

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

swagger_get_schemaGet Schema DetailsA
Read-onlyIdempotent

Get detailed information about a specific component schema (data model), including all properties, types, constraints, and examples.

Use this tool to drill down into a specific data model after using swagger_list_schemas.

Args:

  • spec_name (string): Name of the previously loaded spec

  • schema_name (string): Name of the schema/model (e.g., "Pet", "User", "Order", "Error")

Returns: Formatted output with the full schema definition including type, properties, required fields, enums, constraints, and examples.

Examples:

  • Use when: "Show me the Pet model" -> params with spec_name="", schema_name="Pet"

  • Use when: "What fields does the User schema have?" -> params with spec_name="", schema_name="User"

Error Handling:

  • Returns error if the spec name has not been loaded

  • Returns error if the schema name is not found, suggesting available schemas

ParametersJSON Schema
NameRequiredDescriptionDefault
spec_nameYesName of the previously loaded OpenAPI/Swagger spec (use swagger_list_loaded to see available names)
schema_nameYesName of the schema/model (e.g., 'Pet', 'User', 'Order', 'Error'). Case-sensitive.

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already set readOnlyHint=true and idempotentHint=true. The description adds valuable behavioral details: error handling for unloaded specs and missing schemas with suggestions, and the return format ('full schema definition including type, properties, required fields, enums, constraints, and examples'). This goes beyond what annotations stipulate.

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?

The description is well-structured with clear sections (overview, usage, args, returns, examples, error handling). While it's a bit longer than strictly necessary, every section adds useful context and it's front-loaded with the core purpose.

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 simple read-only 2-param tool with no output schema, the description covers purpose, when to use, what it returns, and error cases. The 'formatted output' is vague, but the overall coverage is strong, making it adequately complete for an agent.

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 coverage is 100% with detailed descriptions for both parameters, including examples and case-sensitivity. The description repeats the parameter names in Args without adding significant new meaning; its examples show usage patterns but don't enhance semantic understanding beyond the schema.

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's function: 'Get detailed information about a specific component schema (data model), including all properties, types, constraints, and examples.' This specific verb+resource distinguishes it from sibling tools like swagger_list_schemas (which lists) and swagger_get_endpoint (which handles endpoints).

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?

It provides explicit workflow guidance: 'Use this tool to drill down into a specific data model after using swagger_list_schemas.' It also includes natural-language examples showing when to use it. It doesn't explicitly exclude alternatives, but the context is clear.

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

swagger_list_loadedList Loaded SpecsA
Read-onlyIdempotent

List all currently loaded OpenAPI/Swagger specifications in memory.

Use this tool to see which specs have been loaded and are available for exploration.

Args: None

Returns: { "loaded": [ // Array of loaded specs { "name": string, "title": string, "version": string, "source": string, "loaded_at": string } ] }

Examples:

  • Use when: "What specs have I loaded?" -> no params needed

  • Use when: "Show my loaded APIs" -> no params needed

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds context that the specs are 'in memory' and 'currently loaded', and includes the return structure with fields. This exceeds the annotation baseline.

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 well-structured with a summary, use cases, args, return format, and examples. Each section serves a purpose with no redundancy or filler.

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

Completeness5/5

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

For a zero-parameter tool, the description is fully complete: it explains what it lists, includes a return structure example, and provides usage examples. There is no missing information that the agent would need.

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 has zero parameters and coverage is 100%. The description explicitly states 'Args: None' and repeats it in examples, which reinforces that no parameters are needed. This is a clear, minimal case with no ambiguity.

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's action ('List') and resource ('currently loaded OpenAPI/Swagger specifications in memory'). It is distinct from sibling tools like swagger_load_spec or swagger_list_tags, which have different purposes.

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 provides clear use cases ('What specs have I loaded?') and notes when no parameters are needed. It does not explicitly exclude alternatives, but the context is sufficient for an agent to understand when this tool is appropriate.

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

swagger_list_pathsList API EndpointsA
Read-onlyIdempotent

List all API endpoints (paths and HTTP methods) from a loaded OpenAPI spec, optionally filtered by tag.

Use this tool to get a high-level overview of all available API operations. Results can be filtered by tag for progressive exploration.

Args:

  • spec_name (string): Name of the previously loaded spec

  • tag (string, optional): Filter endpoints by this tag/group name

  • limit (number): Maximum results to return, between 1-200 (default: 50)

  • offset (number): Number of results to skip for pagination (default: 0)

Returns: { "total": number, // Total number of matching endpoints "count": number, // Number of results in this response "offset": number, // Current pagination offset "endpoints": [...], "has_more": boolean, "next_offset": number }

Examples:

  • Use when: "Show me all endpoints" -> params with spec_name=""

  • Use when: "List all user-related endpoints" -> params with spec_name="", tag="users"

Error Handling:

  • Returns error if the spec name has not been loaded yet

ParametersJSON Schema
NameRequiredDescriptionDefault
tagNoFilter endpoints by tag/group name (e.g., 'users', 'pets', 'store'). Use swagger_list_tags to see available tags.
limitNoMaximum results to return (default: 50, max: 200)
offsetNoNumber of results to skip for pagination (default: 0)
spec_nameYesName of the previously loaded OpenAPI/Swagger spec (use swagger_list_loaded to see available names)

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, so the read-only nature is clear. The description adds value by disclosing error behavior ('Returns error if the spec name has not been loaded yet') and pagination details (has_more, next_offset). It does not cover all nuances, but it meaningfully supplements the annotations.

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

Conciseness3/5

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

The description is well-organized with clear sections (summary, args, returns, examples, error handling), but it duplicates the schema's parameter documentation in the 'Args' block, adding redundancy. The first sentence effectively front-loads the purpose, yet the repeated descriptions make it longer than necessary.

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

Completeness5/5

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

For a tool with four parameters and no output schema, the description is remarkably complete. It includes a detailed return structure, pagination semantics, examples, and error handling. It also implies a prerequisite (spec must be loaded) and guides progressive exploration. No critical missing context for an agent to invoke and interpret results.

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?

Schema coverage is 100%, with all four parameters well-documented in the input schema. The description adds value through concrete usage examples and by reinforcing cross-references to sibling tools (e.g., 'use swagger_list_tags to see available tags' in the schema, which is echoed in the description). The Args section mostly duplicates schema, but the examples and error handling enrich parameter understanding.

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 explicitly states the tool's function: 'List all API endpoints (paths and HTTP methods) from a loaded OpenAPI spec, optionally filtered by tag.' This clearly distinguishes it from sibling tools like swagger_list_tags, swagger_get_endpoint, and swagger_search. The scope and filter capability are specified upfront.

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 provides clear usage context: 'Use this tool to get a high-level overview of all available API operations' and suggests filtering for 'progressive exploration.' It gives concrete examples for when to use the tool with and without a tag. However, it does not explicitly state when not to use it or mention alternative tools for detailed endpoints, though the sibling names hint at these alternatives.

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

swagger_list_schemasList Component SchemasA
Read-onlyIdempotent

List all component schemas (data models) defined in the loaded OpenAPI spec.

Use this tool to get an overview of all data models used by the API, including their types and number of properties.

Args:

  • spec_name (string): Name of the previously loaded spec

  • limit (number): Maximum results to return (default: 50)

  • offset (number): Number of results to skip (default: 0)

Returns: { "total": number, // Total number of schemas "count": number, // Number of results in this response "offset": number, // Current pagination offset "schemas": [{ "name", "type", "description", "properties" }], "has_more": boolean, "next_offset": number }

Examples:

  • Use when: "What data models are defined?" -> params with spec_name=""

  • Use when: "Show me all schemas" -> params with spec_name=""

Error Handling:

  • Returns error if the spec name has not been loaded yet

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results to return (default: 50)
offsetNoNumber of results to skip for pagination (default: 0)
spec_nameYesName of the previously loaded OpenAPI/Swagger spec (use swagger_list_loaded to see available names)

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnlyHint and idempotentHint, and the description adds valuable behavioral details: the return payload structure, pagination semantics (limit, offset, has_more, next_offset), and error handling if the spec name is not loaded. This goes beyond annotations.

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?

The description is well-structured with sections for Args, Returns, Examples, and Error Handling. It is slightly redundant with the schema for parameter descriptions, but the additional return format and examples justify the length.

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

Completeness5/5

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

The tool is simple, but the description covers the purpose, usage, parameters, return format, pagination, and error handling. Combined with strong annotations, this provides complete contextual guidance for an agent.

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?

The input schema covers all three parameters with complete descriptions (100% coverage), so the description adds little beyond that. The 'Args' section restates schema information, and the examples provide usage context but not deeper parameter semantics.

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 uses the specific verb 'List' with the resource 'all component schemas (data models) defined in the loaded OpenAPI spec', clearly distinguishing it from siblings like swagger_get_schema. The scope 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 Guidelines4/5

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

It provides clear when-to-use examples ('What data models are defined?') and states the tool is for getting an overview of all data models. However, it does not explicitly mention alternatives or when not to use it, so it lacks explicit exclusions.

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

swagger_list_tagsList API TagsA
Read-onlyIdempotent

List all API tags/groups and their associated endpoint counts from a loaded OpenAPI spec.

Tags are used to group related endpoints. This tool helps with progressive exploration by showing available filter categories.

Args:

  • spec_name (string): Name of the previously loaded spec

Returns: { "tags": [{ "name": string, "count": number }] }

Examples:

  • Use when: "What tags/groups are available?" -> params with spec_name=""

  • Use when: "How are the endpoints organized?" -> params with spec_name=""

Error Handling:

  • Returns error if the spec name has not been loaded

ParametersJSON Schema
NameRequiredDescriptionDefault
spec_nameYesName of the previously loaded OpenAPI/Swagger spec (use swagger_list_loaded to see available names)

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is known. The description adds useful behavioral context: it requires a previously loaded spec, returns an error if the spec isn't loaded, and lists the return structure with endpoint counts. This goes beyond the annotations but doesn't dive into deeper behaviors like pagination or rate limits.

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 well-structured and front-loaded with the tool's purpose. It includes concise sections for args, return format, examples, and error handling, with no wasted words. Every section earns its place.

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

Completeness5/5

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

For a simple list tool with one parameter, the description is comprehensive: it covers the input source, the return structure, and the error condition. The absence of an output schema is mitigated by the explicit return example in the description. Combined with rich annotations, this is fully complete.

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% and the schema already explains spec_name and points to swagger_list_loaded for available names. The description's 'Args' section simply restates the parameter without adding new semantic detail, so it provides little value beyond the schema.

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 verb and resource: 'List all API tags/groups and their associated endpoint counts from a loaded OpenAPI spec.' This is specific and distinguishes it from sibling tools like swagger_list_paths or swagger_list_schemas, which target different aspects of the spec.

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 provides explicit 'Use when' examples such as 'What tags/groups are available?' and 'How are the endpoints organized?', which clarify when to use this tool. However, it does not explicitly mention when not to use it or name alternative tools, so it falls short of full exclusionary guidance.

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

swagger_load_local_specLoad Local Swagger/OpenAPI Spec FileA
Read-only

Load and parse an OpenAPI (Swagger) specification document from a local JSON file.

This tool reads a JSON OpenAPI/Swagger spec from a local file path and stores it in memory for subsequent exploration. The file path can be absolute or relative to the current working directory.

Each loaded spec is assigned a unique name (title + version). If a spec with the same name already exists, a numeric suffix is appended.

Args:

  • file_path (string): Path to a local OpenAPI/Swagger JSON file (e.g., "./swagger.doc.json" or "/path/to/api-spec.json")

Returns: { "spec_name": string, // The assigned spec name for subsequent tools "title": string, // API title from the spec "version": string, // API version from the spec "description": string, // API description (if available) "endpoints": number, // Total number of API endpoints found "schemas": number, // Total number of schemas/components found "tags": number, // Total number of unique tags found "server_url": string // Base server URL from the spec }

Examples:

  • Use when: "Load the local swagger.doc.json" -> params with file_path="./swagger.doc.json"

  • Use when: "Load our API spec from disk" -> params with file_path="/home/user/projects/api/openapi.json"

Error Handling:

  • Returns error if the file path does not exist

  • Returns error if the file is not valid JSON

  • Returns error if the JSON is not a valid OpenAPI/Swagger spec

ParametersJSON Schema
NameRequiredDescriptionDefault
file_pathYesPath to a local OpenAPI/Swagger JSON file (e.g., './swagger.doc.json' or '/absolute/path/to/spec.json')

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already indicate readOnlyHint=true and destructiveHint=false, but the description adds valuable behavioral detail: it stores the spec in memory, assigns a unique name with numeric suffix for duplicates, and lists exact error conditions. This goes beyond the structured annotations and gives the agent a clear model of side effects and edge cases.

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 well-organized with a clear first sentence, then sections for Args, Returns, Examples, and Error Handling. Every sentence adds necessary information, and there is no filler or redundancy. It is appropriately detailed for a tool that lacks an output schema.

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

Completeness5/5

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

With only one parameter and no output schema, the description fully compensates by detailing the return object's fields with descriptions, explaining naming behavior, and enumerating error scenarios. This makes the tool's behavior fully predictable and self-contained for an agent.

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 already describes file_path with 100% coverage, so the baseline is 3. The description enhances this by providing example path formats ('./swagger.doc.json' vs '/absolute/path/to/spec.json') and explaining that paths can be relative or absolute, giving the agent practical guidance beyond the schema.

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 begins with 'Load and parse an OpenAPI (Swagger) specification document from a local JSON file,' which uses a specific verb and resource. It clearly distinguishes from sibling tools by emphasizing 'local JSON file' and contrasting with the broader swagger_load_spec context.

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 provides clear use-case examples ('Use when: Load the local swagger.doc.json') and states that the path can be absolute or relative, which clarifies when to invoke this tool. However, it does not explicitly mention when not to use it or directly reference alternative tools like swagger_load_spec for remote URLs.

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

swagger_load_specLoad Swagger/OpenAPI SpecA
Read-only

Load and parse an OpenAPI (Swagger) specification document from a URL.

This tool fetches a JSON OpenAPI/Swagger spec from the given URL and stores it in memory for subsequent exploration. You must load a spec before using any other tools.

Each loaded spec is assigned a unique name (title + version). If a spec with the same name already exists, a numeric suffix is appended.

Args:

  • url (string): URL to the OpenAPI/Swagger JSON spec (e.g., "https://petstore.swagger.io/v2/swagger.json")

  • auth_header (string, optional): Authorization header value for protected specs (e.g., "Bearer token123" or "Basic base64encoded"). Only needed for authenticated endpoints.

Returns: { "spec_name": string, // The assigned spec name for subsequent tools "title": string, // API title from the spec "version": string, // API version from the spec "description": string, // API description (if available) "endpoints": number, // Total number of API endpoints found "schemas": number, // Total number of schemas/components found "tags": number, // Total number of unique tags found "server_url": string // Base server URL from the spec }

Examples:

Error Handling:

  • Returns error if URL is unreachable or times out

  • Returns error if the document is not valid OpenAPI/Swagger JSON

  • Returns error if YAML format is provided (only JSON is supported)

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL to the OpenAPI/Swagger JSON spec (e.g., 'https://petstore.swagger.io/v2/swagger.json')
auth_headerNoAuthorization header value for protected specs (e.g., 'Bearer eyJhbGci...' or 'Basic base64string'). Only needed if the spec requires authentication.

TDQS

A4.5/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint, destructiveHint), the description explains in-memory storage, unique name assignment with numeric suffix for duplicates, and error behavior for unreachable URLs, invalid JSON, and unsupported YAML. This adds meaningful behavioral context.

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 well-structured with clear sections (Args, Returns, Examples, Error Handling) and front-loaded with a one-sentence summary. While detailed, every section adds necessary information for a tool that is a prerequisite for all others.

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

Completeness5/5

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

The description provides a complete return object schema, explains the tool's role in the overall workflow, and covers likely failure modes. Since there is no output schema, this level of detail is necessary and fully provided.

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?

Both parameters are fully described in the input schema (100% coverage) with examples and usage notes. The description duplicates these details but does not significantly add to parameter semantics beyond what the schema provides, so the baseline of 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?

The description uses a specific verb ('Load and parse') with a clear resource ('OpenAPI/Swagger specification document from a URL'), and the sibling context (e.g., swagger_load_local_spec) shows this tool is the URL-based loader. This clearly distinguishes it from siblings that list tags/paths or load local specs.

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 explicitly states 'You must load a spec before using any other tools,' providing a mandatory usage context. It also covers when auth_header is needed and gives examples for common requests, though it doesn't explicitly mention swagger_load_local_spec as an alternative—the URL-vs-local distinction is implied by the tool name and description.

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

swagger_remove_specRemove Loaded SpecA
Destructive

Remove a loaded OpenAPI/Swagger specification from memory.

Use this tool to free up memory or reload a spec that has changed.

Args:

  • spec_name (string): Name of the spec to remove

Returns: Confirmation message.

Examples:

  • Use when: "Remove the Petstore API spec" -> params with spec_name="Petstore v1.0.0"

  • Use when: "Unload the internal API spec" -> params with spec_name="Internal API v2.0"

Error Handling:

  • Returns error if the spec name is not found

ParametersJSON Schema
NameRequiredDescriptionDefault
spec_nameYesName of the spec to remove (use swagger_list_loaded to see available names)

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already mark destructiveHint=true, and the description adds meaningful context by specifying the in-memory nature of the removal, the confirmation message returned, and the error case for missing spec names. This goes beyond the raw annotation without contradicting it.

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?

The description is well-structured with a front-loaded action statement followed by usage, args, returns, examples, and error handling. The examples are useful, though the Args section somewhat redundantly repeats the schema information.

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 simple one-parameter destructive tool without an output schema, the description covers purpose, usage scenarios, return type, and error handling. It does not explicitly address reversibility, but the reload workflow implies it, making it sufficiently complete.

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?

The schema already fully describes the single parameter 'spec_name' and points to swagger_list_loaded for available names. The description's Args section and examples add some practical context, but do not significantly extend the schema's semantic coverage.

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 action 'Remove a loaded OpenAPI/Swagger specification from memory', clearly identifying both the verb and the resource. This distinguishes it from sibling tools like swagger_load_spec and swagger_list_loaded, and the concrete examples further solidify the intent.

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 provides explicit use cases: 'free up memory or reload a spec that has changed', which gives clear context for when to invoke this tool. It does not explicitly name alternatives, but the reload workflow implies removing before loading, which is sufficient guidance.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 12 tool updatesv0.0.3
    • First observedswagger_get_endpoint
    • First observedswagger_get_endpoint_full
    • First observedswagger_get_info
    • First observedswagger_get_schema
    • First observedswagger_list_loaded
    • First observedswagger_list_paths
    • First observedswagger_list_schemas
    • First observedswagger_list_tags
    • First observedswagger_load_local_spec
    • First observedswagger_load_spec
    • First observedswagger_remove_spec
    • First observedswagger_search

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: loading (URL vs local file), managing loaded specs, listing tags/paths/schemas, getting details, and searching. The two endpoint-detail tools differ explicitly in whether schema references are resolved, and their descriptions make this clear.

Naming Consistency5/5

All tools follow a consistent snake_case pattern with the 'swagger_' prefix and a verb-object structure (load_spec, list_tags, get_endpoint, etc.). Exceptions like load_local_spec and get_endpoint_full are systematic and readable.

Tool Count5/5

12 tools is well-scoped for a Swagger/OpenAPI explorer. The count covers the full exploration lifecycle—loading, listing, retrieving, searching, and managing specs—without unnecessary bloat or missing essentials.

Completeness5/5

The tool surface is complete for the stated exploration purpose. It supports loading (URL + local), inspecting info/tags/paths/schemas, drilling into endpoints (with optional full $ref resolution), searching, and removing specs. No obvious dead ends or missing operations.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Discovers, inspects, and executes requests against OpenAPI or Swagger APIs directly from documentation URLs or specification files. It enables users to trace parameter usage across an API and perform authenticated HTTP requests through a structured toolset.
    8
    27
    5
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Exposes Swagger/OpenAPI API documentation to AI models, enabling exploration, search, and interaction with endpoints, schemas, and execution of API calls.
    14
    13
    2
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/anuoua/swagger-doc-explorer-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server