Skip to main content
Glama
NekoTarou

swagger-api-mcp-server

by NekoTarou

Swagger API MCP Server

License Build & Test npm version npm downloads Node.js Version MCP Badge

English | 中文

An MCP (Model Context Protocol) server that parses Swagger 2.0 and OpenAPI 3.x specifications, exposing API structure through MCP tools. Features a local file-cache architecture that reduces token usage by 85-95% compared to inline responses.

Features

  • Swagger 2.0 & OpenAPI 3.x — Full dual-format support

  • Smart Caching — Spec parsed once, stored as local JSON files; tools return compact summaries + file paths (~200 chars vs 5-20KB)

  • 11 MCP Tools — Load, browse, search, call APIs, and manage auth dynamically

  • 3 MCP Prompts — Guided workflows for exploring, searching, and integrating APIs

  • 3 MCP Resources — Direct access to cached API info, endpoints, and schemas

  • Two Transport Modes — stdio (for CLI/IDE integration) and HTTP (for multi-session web use)

  • 2-Phase API Calls — Preview requests before executing them

  • Zero External Parsers — Custom $ref resolver with circular reference protection

Related MCP server: OpenAPI MCP Server

Prerequisites

  • Node.js >= 24

Quick Start

Install from npm

npm install -g swagger-api-mcp-server

Or clone and build

git clone https://github.com/NekoTarou/swagger-api-mcp-server.git
cd swagger-api-mcp-server
npm install
npm run build

Run

# stdio mode (default) — for MCP clients like Claude Desktop
npm start

# Auto-load a spec on startup
SWAGGER_URL=https://petstore.swagger.io/v2/swagger.json npm start

# HTTP mode — multi-session with Express
npm run start:http

MCP Client Configuration

Claude Desktop

Add to your Claude Desktop config file (claude_desktop_config.json):

{
  "mcpServers": {
    "swagger-api": {
      "command": "npx",
      "args": ["-y", "swagger-api-mcp-server"],
      "env": {
        "SWAGGER_URL": "https://petstore.swagger.io/v2/swagger.json"
      }
    }
  }
}

Cursor / VS Code

Add to your MCP settings:

{
  "mcpServers": {
    "swagger-api": {
      "command": "npx",
      "args": ["-y", "swagger-api-mcp-server"],
      "env": {
        "SWAGGER_URL": "https://your-api.example.com/openapi.json"
      }
    }
  }
}

Tools

Tool

Description

swagger_load_spec

Load a Swagger/OpenAPI spec from URL, parse and cache it

swagger_update_cache

Re-fetch spec and rebuild cache

swagger_get_info

Get API metadata (title, version, servers, auth schemes)

swagger_list_tags

List all tags with endpoint counts

swagger_list_paths

List endpoints with filtering (tag, method, keyword) and pagination

swagger_get_endpoint

Get endpoint summary + cached file path for full details

swagger_list_schemas

List schema definitions with filtering and pagination

swagger_get_schema

Get schema summary + cached file path for full definition

swagger_search

Search across endpoints and schemas by keyword

swagger_call_api

Execute HTTP requests with 2-phase confirmation

swagger_set_auth

Dynamically set or clear the Authorization header at runtime

Prompts

Prompt

Arguments

Description

swagger_explore_api

url

Guided workflow to load and fully explore an API spec

swagger_find_endpoint

keyword

Search for endpoints by keyword and view full details

swagger_integrate_api

url, task

Find the right endpoint for a task and execute an API call

Resources

Resource

URI

Description

api-info

swagger://api/info

API basic information (title, version, servers, auth)

api-endpoints

swagger://api/endpoints

Index of all API endpoints

api-schemas

swagger://api/schemas

Index of all schema/model definitions

Cache Architecture

When a spec is loaded, it's parsed once and stored as structured JSON files:

.swagger-cache/
├── meta.json              # Cache metadata (URL, counts, timestamp)
├── info.json              # Full API info (title, servers, auth)
├── tags.json              # Tag list with endpoint counts
├── paths-index.json       # Endpoint index for fast lookup
├── schemas-index.json     # Schema index for fast lookup
├── endpoints/             # One file per endpoint (deep-resolved)
│   └── GET__users__{id}.json
└── schemas/               # One file per schema (deep-resolved)
    └── User.json

Tools return brief summaries with file paths. The LLM reads full details on demand via the Read tool — saving 85-95% of tokens per call.

Environment Variables

Variable

Default

Description

SWAGGER_URL

(empty)

Auto-load spec on startup

TRANSPORT

stdio

Transport mode: stdio or http

MCP_PORT

3000

HTTP server port

MCP_HOST

0.0.0.0

HTTP server host

API_BASE_URL

(empty)

Override API base URL for calls

API_AUTH_TOKEN

(empty)

Initial Authorization header value (can be updated at runtime via swagger_set_auth)

CACHE_DIR

.swagger-cache

Custom cache directory path

SESSION_TIMEOUT_MS

1800000

HTTP session timeout (30 min)

MAX_SESSIONS

100

Max concurrent HTTP sessions

Development

npm run dev            # Dev mode with auto-reload (tsx watch)
npm test               # Run tests
npm run build          # TypeScript compilation → dist/
npm run clean          # Remove dist/

License

MIT

Available Tools

11 tools
swagger_call_apiCall API EndpointA
Destructive

Execute an actual HTTP request to an API endpoint. Uses a 2-phase confirmation: first call shows a preview of the request, second call with confirmed=true executes it. Uses the base URL from the spec, API_BASE_URL env var, or the base_url parameter.

ParametersJSON Schema
NameRequiredDescriptionDefault
bodyNoRequest body (JSON)
pathYesAPI endpoint path (e.g. /users/{id})
methodYesHTTP method (GET, POST, PUT, DELETE, etc.)
headersNoAdditional request headers
base_urlNoOverride base URL (default from spec or API_BASE_URL env)
confirmedNoSet to true to actually execute the request. When false (default), shows a preview of the request.
path_paramsNoPath parameter values (e.g. { id: '123' })
query_paramsNoQuery parameters

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already mark this as destructive and non-idempotent. The description adds valuable behavioral context by disclosing the two-phase confirmation (preview then execute with confirmed=true) and the base URL resolution order (spec, env var, or parameter), which the annotations do not convey.

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 with no wasted words. The primary action is front-loaded, followed by the most important behavioral nuance (confirmation) and the base URL precedence. Every clause contributes meaningful 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?

Given the tool's complexity (8 parameters, two-phase confirmation, no output schema), the description covers the critical flow and URL resolution. It does not describe response shapes or failure modes, but for an execution tool the confirmation mechanism is the most important context and is well described.

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 describes all 8 parameters with 100% coverage, so baseline is 3. The description additionally clarifies the semantics of two key parameters: 'confirmed' controls preview vs. execution, and 'base_url' can override other sources. This adds meaning beyond the schema without repeating it.

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 'Execute an actual HTTP request to an API endpoint,' using a specific verb and resource that clearly distinguishes this tool from sibling tools that only read or load spec data. It also mentions the two-phase confirmation, which adds to its unique identity.

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 context makes it obvious this is the tool for making real API calls versus the read-only/spec-management siblings. It does not explicitly spell out 'use this instead of swagger_get_endpoint when you want to send a request,' but the wording 'actual HTTP request' implies that distinction effectively.

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

swagger_get_endpointGet Endpoint DetailsA
Read-onlyIdempotent

Get a brief summary of a specific API endpoint and the path to its cached JSON file containing complete details (parameters, request body, responses, security). Use the Read tool on the returned file path to see the full endpoint definition.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesAPI endpoint path (e.g. /users/{id})
methodYesHTTP method (GET, POST, PUT, DELETE, etc.)

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the tool as read-only and non-destructive. The description adds valuable context about the return value being a cached file path and instructs the user to Read that file for full details, making the tool's behavior more transparent without contradicting annotations.

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 short sentences, front-loaded with the primary purpose and a clear follow-up instruction. No unnecessary words.

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?

Despite lacking an output schema, the description explains the return value (brief summary and file path), what the file contains, and how to access full details, which is sufficient for a simple two-parameter read-only 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?

Both parameters are fully described in the schema with examples (path and method). The description does not add further parameter details, but since schema coverage is 100%, 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 ('Get'), identifies the resource ('specific API endpoint'), and distinguishes itself from siblings by mentioning the cached JSON file path and the Read tool follow-up, making its unique function clear.

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 description provides clear context (get a specific endpoint's summary and path) but does not explicitly compare to alternatives or state when not to use it. It does give a follow-up instruction to use Read, implying the tool is a starting point for full details.

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 metadata about the loaded API specification. Returns a brief summary and the path to info.json which contains full details (title, version, description, servers, authentication schemes, contact info). Use the Read tool on the file path to see complete information.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

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 agent knows this is a safe read. The description adds valuable behavioral context beyond the annotations by disclosing the return format: a brief summary and a path to info.json. It also specifies what the file contains (title, version, servers, auth schemes, etc.), which is not available from the schema or annotations.

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 earning its place: first states purpose, second summarizes return value, third gives an actionable follow-up instruction. It is front-loaded and contains no fluff or repetition.

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 metadata tool with no parameters and no output schema, the description completely explains what to expect: a brief summary, a path to info.json, and what the file contains. The instruction to use the Read tool covers how to get full details, making the workflow clear. No gaps are apparent.

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 tool has zero parameters, so the baseline is 4. The description adds meaning by explaining the output, but no parameter semantics are needed. Since there is no schema coverage issue, a 4 is appropriate.

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 states exactly what the tool does: 'Get general metadata about the loaded API specification.' It uses a specific verb ('Get') and a clear resource ('general metadata about the loaded API specification'), and distinguishes itself from siblings like get_endpoint or get_schema by focusing on overall metadata rather than specific parts.

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 description implies usage: use this tool to get a summary and a path, then follow up with the Read tool. However, it does not explicitly say when to use this tool versus alternatives like swagger_get_schema or swagger_list_tags, nor does it mention when not to use it. The guidance is useful but only implicitly conveys the intended workflow.

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 a brief summary of a specific schema/model and the path to its cached JSON file containing the complete deep-resolved definition (all properties, types, required fields, enums, defaults, nested structures). Use the Read tool on the returned file path to see the full schema.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesSchema/model name (e.g. 'User', 'OrderResponse')

TDQS

A4.1/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, so the safe read nature is known. The description adds useful behavioral context: it returns a 'brief summary' and a 'path to its cached JSON file' rather than the full content directly, and indicates the file contains a 'complete deep-resolved definition' with specific elements. This aligns with annotations and adds value.

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 two sentences and front-loaded with the main purpose. The first sentence states the action and output; the second provides a clear next step. The enumeration of contained elements ('all properties, types, required fields, enums, defaults, nested structures') is somewhat detailed but clarifies what the cached file holds, earning its place.

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 tool with a single required parameter and no output schema, the description sufficiently explains what the tool returns (summary + file path) and how to proceed to get the full definition. It does not mention error handling for unknown schema names, but the core usage is covered, making it complete enough for practical use.

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 already documents the only parameter 'name' with a description and examples: 'Schema/model name (e.g. 'User', 'OrderResponse')'. The tool description reinforces that it targets a 'specific schema/model' but adds no new semantic details beyond the schema. With 100% schema coverage, the baseline of 3 is appropriate.

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 a brief summary of a specific schema/model and the path to its cached JSON file containing the complete deep-resolved definition.' It uses a specific verb ('Get'), a specific resource ('schema/model'), and distinguishes itself from siblings like swagger_list_schemas (which lists all schemas) by focusing on a single named schema and returning a file path.

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 follow-up guidance: 'Use the Read tool on the returned file path to see the full schema.' This tells the agent what to do after calling the tool. However, it does not explicitly mention alternatives or when not to use the tool, so it stops short of the highest rating.

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 with method, path, summary, and tags. Supports filtering by tag, HTTP method, and keyword search. Use pagination (limit/offset) for large APIs. Each entry includes a cacheFile path for detailed info.

ParametersJSON Schema
NameRequiredDescriptionDefault
tagNoFilter by tag name
limitNoMaximum results to return (default 50)
methodNoFilter by HTTP method (GET, POST, PUT, DELETE, etc.)
offsetNoNumber of results to skip for pagination
keywordNoFilter by keyword in path, summary, or operationId

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, so the agent knows it's safe. The description adds behavioral context about return fields, pagination for large APIs, and the presence of a cacheFile path for each entry, which is useful for post-processing.

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 four short sentences, each serving a purpose: listing, filtering, pagination, and return detail. It is front-loaded with the primary action and contains no 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?

Given the read-only annotations and optional parameters, the description covers what the tool returns, how to filter, and how to paginate. The absence of an output schema is mitigated by the explicit mention of returned fields and cacheFile. It is adequate for an agent to select and invoke the tool correctly.

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%, so baseline is 3. The description adds value by grouping parameters into filters (tag, method, keyword) and pagination (limit, offset), and by explaining that cacheFile paths are included in results, which is not in the schema. This clarifies how parameters work together.

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 it lists all API endpoints with specific fields (method, path, summary, tags), which distinguishes it from sibling tools like swagger_get_endpoint (single endpoint) and swagger_list_tags (tags only). It also mentions filtering and pagination, giving a complete sense of the tool's function.

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 the tool is for listing endpoints with filtering options and pagination, and mentions that each entry includes a cacheFile path for detailed info, implying the next step. However, it doesn't explicitly name alternatives like swagger_get_endpoint for single-endpoint details, so it lacks a direct when-not-to-use statement.

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

swagger_list_schemasList Schema DefinitionsA
Read-onlyIdempotent

List all model/schema definitions in the API spec. Shows schema name, type, description, and property count. Supports keyword filtering and pagination.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum results to return (default 50)
offsetNoNumber of results to skip for pagination
keywordNoFilter schemas by name or description keyword

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare read-only and non-destructive behavior, so the safety profile is covered. The description adds valuable context about returned fields (name, type, description, property count) and supports filtering/pagination, going beyond the annotation-only information.

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 concise sentences, front-loaded with the main action ('List all model/schema definitions') followed by the output summary and feature hints. No fluff or redundant information.

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 listing tool, the description is complete. It states what the tool returns (fields), mentions filtering and pagination, and the annotations confirm safety. No output schema exists, but the described output is sufficient for the intended use.

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?

All three parameters (limit, offset, keyword) are fully described in the schema, achieving 100% coverage. The description only restates that filtering and pagination are supported, which adds no new meaning beyond the existing schema 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 lists all model/schema definitions in the API spec, with a specific verb ('List') and scope ('all model/schema definitions'). It also lists the expected output fields (name, type, description, property count), distinguishing it from sibling tools like `swagger_get_schema` which likely targets a single 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 implies use cases: enumerating schemas, filtering by keyword, and paginating. However, it does not explicitly mention when not to use it or provide direct alternatives (e.g., 'use get_schema for a specific schema'). The context is clear but 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 tags defined in the API spec. Tags are used to group related endpoints. Also shows how many endpoints belong to each tag.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, covering the safety profile. The description adds behavioral detail by stating it 'shows how many endpoints belong to each tag,' which goes beyond the schema and gives insight into return content. No contradiction with annotations exists.

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 two sentences, front-loaded with the core action ('List all tags defined in the API spec'), and every sentence adds value: the second explains the grouping purpose, and the third clarifies the output includes counts. No redundancy or fluff.

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 list tool with no parameters and no output schema, the description sufficiently explains what the tool does and what information it returns (tags and counts). It does not detail the exact response structure, but given the tool's simplicity, the description is complete enough for an agent to select and invoke it correctly.

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 tool has zero parameters, and the input schema is empty with 100% coverage. The description does not need to explain parameter semantics, and the baseline for 0-parameter tools is 4. It adds no param-specific info but is not required to.

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 primary function: 'List all tags defined in the API spec.' It specifies the resource (tags) and the verb (list), and adds context that tags group related endpoints. This distinguishes it from sibling tools like list_paths and list_schemas, which operate on different resources.

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 description implicitly conveys when to use the tool (when you need to see tags and their endpoint counts), but it does not explicitly mention alternatives or provide exclusionary guidance. It lacks a direct 'use this instead of...' statement, making usage guidance only 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.

swagger_load_specLoad Swagger/OpenAPI SpecA
Read-onlyIdempotent

Load and parse a Swagger 2.0 or OpenAPI 3.x specification from a URL. Supports both JSON and YAML formats. The loaded spec is parsed, cached to local JSON files, and used by all subsequent tools. Must be called first before using other tools (unless SWAGGER_URL env var is set).

ParametersJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the Swagger/OpenAPI spec (JSON or YAML)
headersNoOptional HTTP headers for fetching the spec (e.g. authorization)

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already indicate readOnly, idempotent, and non-destructive. The description adds valuable context beyond annotations: it caches to local JSON files, is used by all subsequent tools, and must be called first. It doesn't disclose all details (e.g., overwrite behavior, error handling), but the added context satisfies the need for behavioral transparency beyond the structured hints.

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 earning its place: purpose and formats, caching behavior, and required ordering. It is front-loaded and free of redundant or vague wording.

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 moderately complex setup tool, the description covers purpose, accepted formats, caching, subsequent tool dependencies, and invocation order. Given the high schema coverage and suitable annotations, the description is complete enough for an agent to select and use this tool correctly. It even notes an environment-variable shortcut, which is valuable operational context.

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%: both 'url' and 'headers' already have clear descriptions. The tool description mentions JSON/YAML support, but that is already embedded in the url parameter description. No additional parameter-level meaning is provided beyond what the schema already gives, so the baseline of 3 is appropriate.

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'), names the resource ('Swagger 2.0 or OpenAPI 3.x specification from a URL'), and distinguishes this tool from siblings by framing it as the initialization step for all subsequent tools. It also specifies supported formats (JSON/YAML), 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 provides explicit usage guidance: 'Must be called first before using other tools' and notes the exception when SWAGGER_URL env var is set. This clearly tells the agent when to invoke this tool versus alternatives (the sibling tools that operate on the loaded spec).

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

swagger_set_authSet Auth TokenA
Idempotent

Dynamically set or clear the Authorization header used by swagger_call_api. The token value is used as-is for the Authorization header (no automatic Bearer prefix). Pass clear=true to remove the current token.

ParametersJSON Schema
NameRequiredDescriptionDefault
clearNoSet to true to clear the current auth token.
tokenNoThe full Authorization header value (e.g. 'Bearer xxx', 'Basic xxx'). No prefix is added automatically.

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the annotations (which indicate non-read-only, idempotent, non-destructive), the description adds key behavioral detail: the token is used as-is with no automatic Bearer prefix, and clear=true removes the current token. This informs the agent of subtle security/format implications that annotations do not capture.

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 two sentences, front-loaded with the core action and followed by essential usage details. Every sentence contributes to understanding the tool without repetition or fluff.

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 two-parameter tool with no output schema, the description adequately covers the operation: setting/clearing auth for swagger_call_api, including the token format nuance. It could mention persistence across calls or how to view the current token, but such details are not necessary for basic correct usage.

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 has 100% parameter coverage, with detailed descriptions for both clear and token. The description reinforces the 'no automatic prefix' rule but adds minimal new parameter meaning beyond what the schema already provides. The reference to swagger_call_api is contextual rather than parameter-specific.

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: dynamically setting or clearing the Authorization header for swagger_call_api. The verb-resource pairing is specific (set/clear + Authorization header), and it distinguishes itself from the sibling tools by being uniquely focused on auth management.

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 indicates the tool is used for swagger_call_api, giving clear usage context. It explains how to set a token and how to clear it via clear=true. However, it doesn't explicitly contrast with alternatives or state when not to use it; given that it's the sole auth tool among siblings, the context is clear enough.

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

swagger_update_cacheUpdate Spec CacheA
Idempotent

Re-fetch the Swagger/OpenAPI spec and rebuild the local file cache. Use this when the upstream spec has changed. Optionally provide a new URL.

ParametersJSON Schema
NameRequiredDescriptionDefault
urlNoURL of the spec to reload. If omitted, re-fetches the previously loaded URL.
headersNoOptional HTTP headers for fetching the spec

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare idempotency and non-destructiveness, and the description adds the concrete behavior of rebuilding the local file cache, which is useful. It does not detail error handling or side effects of providing a new URL, but the existing annotation coverage lowers the bar.

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 crisp sentences accomplish the description's goal without redundancy. The first sentence states the action, the second gives the usage trigger and param note.

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 tool with two optional parameters and no output schema, the description covers the core functionality and usage scenario adequately. It does not explicitly differentiate from swagger_load_spec, but the purpose and annotations provide enough context for an agent to decide to use it when a spec refresh is needed.

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 describes both parameters with full coverage; the description's 'Optionally provide a new URL' merely restates the schema's optionality, adding no new semantic information. Baseline for 100% schema coverage is 3, and the description does not elevate it.

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 specific action verbs 'Re-fetch' and 'rebuild' to state its function, clearly distinguishing it from read-only sibling tools by indicating it modifies the local cache. The mention of Swagger/OpenAPI spec identifies the resource.

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?

Explicitly states when to use ('when the upstream spec has changed'), providing clear context for invocation. Does not name alternatives or exclusions, but the 'when' clause is sufficient for a simple cache refresh tool.

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. 11 tool updatesv1.0.6
    • First observedswagger_call_api
    • First observedswagger_get_endpoint
    • First observedswagger_get_info
    • First observedswagger_get_schema
    • First observedswagger_list_paths
    • First observedswagger_list_schemas
    • First observedswagger_list_tags
    • First observedswagger_load_spec
    • First observedswagger_search
    • First observedswagger_set_auth
    • First observedswagger_update_cache

TDQS

A4.4/5.0
Disambiguation5/5

Each tool targets a distinct resource or action: loading/updating the spec, metadata, lists of paths/tags/schemas, detailed endpoint/schema lookups, search, API execution, and auth management. No two tools overlap; even similar get_endpoint and get_schema differ clearly by target resource.

Naming Consistency5/5

All tools use a consistent snake_case pattern with the swagger_ prefix and a clear verb_noun structure (load_spec, list_paths, get_schema, call_api, set_auth). No mixed conventions or vague verbs.

Tool Count5/5

11 tools is well-scoped for a Swagger/OpenAPI explorer, covering spec loading, introspection, search, and API invocation without redundancy. Each tool earns its place.

Completeness5/5

The toolset covers the full lifecycle of working with an API spec: load/update, metadata, path/tag/schema enumeration, deep details, search, auth setup, and making real calls. No obvious gaps for the intended purpose.

Maintenance

ActivityInactive
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

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/NekoTarou/swagger-api-mcp-server'

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