Skip to main content
Glama

swagger-docs-mcp

简体中文 | English | 日本語 | 한국어

npm version CI Node.js 20+ Swagger 2.0 MCP Server License MIT Website

面向 Swagger 2.0 / Knife4j 文档的只读 MCP 服务,让 AI Agent 能够实时检索并展开接口定义。

swagger-docs-mcp 面向需要读取后端接口文档的 AI Agent。它实时获取 Swagger 2.0 文档,将接口、参数和 Schema 转换为结构化结果,同时保持无状态、只读和来源可追溯。

特性

  • 实时读取:支持 Swagger JSON,以及 Knife4j(Springfox)doc.html 文档发现。

  • 多维检索:可按分类、路径、HTTP Method、关键词或 Knife4j 深链接定位接口。

  • 结构化 Schema:递归展开受支持的请求体和响应模型,同时对动态 Map、循环、缺失引用和外部引用保留明确边界。

  • 结果可追溯:每次查询均返回文档入口、实际规范地址、获取时间和文档指纹。

  • 边界明确:不保存文档地址、不使用跨调用缓存、不调用业务接口,也不推测无法解析的字段。

  • 多客户端支持:提供 Codex、Claude Code、Gemini CLI 及 IDE Agent 客户端的接入配置。

Related MCP server: Swagger Navigator MCP Server

快速开始

运行环境要求 Node.js 20 或更高版本。无需全局安装:

接入 MCP 客户端

swagger-docs-mcp 已发布到 npm Registry,以下命令可直接使用。Codex、Claude Code 和 Gemini CLI 会自动写入配置,并核验实际启动命令是否与预期一致:

npx --yes swagger-docs-mcp@latest setup codex
npx --yes swagger-docs-mcp@latest setup claude
npx --yes swagger-docs-mcp@latest setup gemini

IDE 类客户端使用同一个入口生成对应格式的配置:

npx --yes swagger-docs-mcp@latest setup cursor
npx --yes swagger-docs-mcp@latest setup vscode
npx --yes swagger-docs-mcp@latest setup opencode

查看全部支持项:

npx --yes swagger-docs-mcp@latest setup list

自动配置会把当前精确包版本写入客户端配置,确保后续启动可复现。卸载本项目创建的旧版本配置:

npx --yes swagger-docs-mcp@latest remove claude

upgrade 当前只执行归属与安全检查。由于客户端官方 CLI 无法提供可验证的原子替换和完整回滚,检测到旧版本后会明确停止并要求手动升级,不会先删除原配置。

让 Agent 协助接入

将下面的任务直接发送给具备本机命令和文件操作能力的 Agent。任务要求 Agent 先核实客户端与配置契约,再执行安装、配置和验证,避免覆盖已有配置:

请帮我在当前 MCP 客户端中安装并配置 swagger-docs-mcp。

要求:
1. 先确认 Node.js 版本不低于 20,并识别当前客户端的准确名称;不要猜测客户端或配置格式。
2. 运行 `npx --yes swagger-docs-mcp@latest setup list`,根据输出选择准确的客户端 ID。
3. 运行 `npx --yes swagger-docs-mcp@latest setup <client>`。
4. 如果命令自动写入配置,确认结果明确通过启动命令一致性核验。
5. 如果命令只输出 JSON,仅在核实当前客户端的官方配置文件位置和结构后,合并 `swagger-docs` 条目并保留其他配置;写入后重新解析配置,核对完整启动命令。
6. 如发现同名配置、权限错误、无法核验或外部契约不明确,立即停止并说明原因;不要覆盖、删除或猜测修复。
7. 最后运行 `npx --yes swagger-docs-mcp@latest doctor`,并报告实际使用的客户端 ID、执行命令、修改位置和核验结果。

不要保存 Swagger 文档地址、口令或 Token,也不要修改与本次接入无关的 MCP 配置。

运行诊断

# 检查本机运行环境
npx --yes swagger-docs-mcp@latest doctor

# 验证实时文档发现
npx --yes swagger-docs-mcp@latest doctor http://127.0.0.1:8080/doc.html

# 验证指定分组
npx --yes swagger-docs-mcp@latest doctor https://example.com/doc.html --group exact-group-name

# 输出供 CI 或脚本消费的 JSON
npx --yes swagger-docs-mcp@latest doctor https://example.com/doc.html --json

客户端支持

名称

客户端

接入方式

codex

OpenAI Codex

自动写入并核验启动命令一致性

claude

Claude Code

自动写入并核验启动命令一致性

gemini

Gemini CLI

自动写入并核验启动命令一致性

vscode

VS Code / GitHub Copilot

生成 servers 配置

cursor

Cursor

生成 mcpServers 配置

windsurf

Windsurf

生成 mcpServers 配置

trae

Trae

生成 mcpServers 配置

cline

Cline

生成 mcpServers 配置

roo

Roo Code

生成 mcpServers 配置

kiro

Kiro

生成 mcpServers 配置

opencode

OpenCode v2

生成 mcp.servers 配置

自动配置只调用客户端官方 CLI,探测命令在系统临时目录执行并设有 15 秒超时。配置生成模式仅输出 JSON,不读取或修改用户文件。发现任意同名冲突时,setup 都会拒绝覆盖;npm alias、额外启动参数和无法解析的配置均按外部配置处理。新增或核验失败时不会按服务名自动清理,避免误删并发写入的配置,CLI 会要求用户手动检查。卸载会在执行前再次核验启动命令,并在执行后确认同名配置已消失。

“生成配置”表示按客户端公开配置结构输出模板,不代表已在所有客户端版本上完成运行时联调。客户端升级配置格式后,应以其官方文档为准并提交兼容性 Issue。

使用示例

在对话中同时提供文档地址和查询目标:

列出 http://203.0.113.10:8080/doc.html 的所有接口分类。
查询 http://203.0.113.10:8080/doc.html 的
/api/v1/study-exam-stat/baseline-class-stat POST,
展开完整的请求和响应字段。
在 http://203.0.113.10:8080/doc.html 中搜索“成绩统计”。

也可以直接查询 Knife4j 深链接:

查询接口:
http://203.0.113.10:8080/doc.html#/default/uniform-study-exam-stat-controller/getUniformStudyExamStatDetailUsingGET

示例地址 203.0.113.10 属于 IANA 保留地址,不对应真实服务。

让主 Agent 继续开发和调试

swagger-docs-mcp 负责实时读取并验证接口文档,Tool 结果会直接返回当前主 Agent。主 Agent 可继续检查项目代码、完成接口对接并运行测试,不需要手工复制请求和响应字段:

请根据下面的接口文档调试当前功能:

http://203.0.113.10:8080/doc.html#/default/uniform-study-exam-stat-controller/getUniformStudyExamStatDetailUsingGET

要求:
1. 先通过 swagger-docs-mcp 实时查询并验证接口,不猜测字段。
2. 核对请求方法、路径、必填参数、请求体和响应字段。
3. 检查当前项目已有的接口封装、调用位置和页面状态。
4. 按项目现有模式修复或完成对接,不添加猜测式兼容分支。
5. 运行必要的测试或页面调试,报告文档来源和实际验证结果。

主 Agent 需要同时具备目标代码、终端或浏览器调试能力,以及访问测试环境所需的网络和登录态。本 MCP 只读取文档,不调用 Swagger 中描述的业务接口;业务请求仍由项目运行时或主 Agent 的调试工具发起。

MCP Tools

Tool

说明

inspect_api_docs

识别文档入口或深链接,验证导航线索并返回下一步操作

list_api_categories

分页列出接口分类及接口数量

get_api_category

按精确分类名返回接口摘要或完整文档

get_api_by_path

按精确路径和可选 HTTP Method 返回完整接口文档

search_apis

搜索路径、摘要、描述、分类和 operationId

所有 Tool 都要求显式传入 docsUrl,并声明 outputSchema。成功结果统一包含 sourcesourceNoticedatawarningscompleteness;错误结果使用 isError: true,同时返回稳定错误码和失败阶段。接口详情包括请求参数、请求体 Schema、响应状态,以及:

  • schemaTree:保留模型层级的字段树。

  • flatFields:便于检索和展示的扁平字段路径。

  • schemaReferences:解析过程中引用的 Schema。

  • unresolvedDynamicFields:无法静态展开的动态字段。

  • warningscompleteness:解析边界与结果完整性。

查询流程

  1. inspect_api_docs 实时检查文档入口和 Knife4j hash 线索。

  2. 多分组文档返回候选分组,由用户精确选择;服务不会自动猜测。

  3. 分类或接口不唯一时返回候选项;定位唯一接口后调用 get_api_by_path

  4. 后续调用继续携带原始 docsUrl 及已确认的 grouppathmethod

Tool 返回的 sourceNotice 说明本次查询来源和缓存状态,Agent 应在最终回答中保留该信息。

支持范围

项目

状态

Swagger 2.0 JSON

支持

Knife4j / Springfox 文档发现

支持

Knife4j hash 深链接

支持

OpenAPI 3.x

暂不支持,返回明确的版本错误

MCP 传输

stdio

文档协议

HTTP、HTTPS

URL 内嵌认证信息

不支持

外部 $ref

不读取,保留解析边界

顶层参数 / 响应本地 $ref

支持;缺失引用标记为部分完整

Schema 本地 $ref、数组、allOf

支持递归展开

动态 Map、循环引用、最大深度

保留边界并标记为部分完整

安全边界

  • 访问用户明确提供的文档入口及其同源发现地址,不调用规范中描述的业务 API。

  • 每次 Tool 调用都重新获取文档,不保存地址、选择状态或历史响应。

  • 单次请求超时 10 秒,响应体最大 20 MB。

  • 最多跟随 3 次同源重定向,拒绝跨主机重定向和跨主机发现地址。

  • 拒绝包含用户名或密码的 URL,不读取外部 $ref

  • 动态字段、缺失引用、循环引用和最大深度均返回明确警告。

  • 上游失败时返回错误阶段和请求地址,不使用历史文档降级。

  • 查询结果会回传文档地址用于溯源,不要在 URL 查询参数中携带口令或令牌。

默认允许访问进程可达的公网、内网和本机 HTTP(S) 地址,因此本工具不是 SSRF 隔离代理。处理不受信任的 URL 时,应设置精确来源白名单:

SWAGGER_DOCS_ALLOWED_ORIGINS=https://api.example.com,http://127.0.0.1:8080 \
  npx --yes swagger-docs-mcp@latest

完整信任边界和漏洞报告方式见 SECURITY.md

开发

npm run dev               # 直接运行 TypeScript 入口
npm run typecheck         # 类型检查
npm test                  # 完整测试
npm run test:integration  # MCP 集成测试
npm run build             # 构建 dist
npm run check             # 类型检查、测试和构建

本地源码接入可在构建后使用 node dist/index.js setup <client> --local--local 会写入当前仓库中 dist/index.js 的绝对路径,仓库移动后必须重新生成配置。

源码按职责分层:

目录

职责

src/source

安全 HTTP 获取与文档发现

src/navigation

Knife4j hash 导航解析

src/parser

解析器公共契约

src/swagger2

Swagger 2.0 解析实现

src/service

查询、分页与来源封装

src/server

MCP Tool 契约

src/cli

诊断和客户端配置

src/domain

共享领域模型

新增规范版本时,可实现新的 ApiSpecParser 并复用现有 Service 和 MCP Tool 契约。

JavaScript / TypeScript API

npm 根入口无 CLI 副作用,公开 createMcpServerApiDocsServiceSwagger2ParserSafeHttpClient 及领域类型。未通过根入口导出的 dist 内部路径不属于语义化版本兼容范围。

import { ApiDocsService } from "swagger-docs-mcp";

const service = new ApiDocsService();
const result = await service.listCategories("https://api.example.com/v2/api-docs", undefined, 1, 20);

发布

  1. 更新版本号和 CHANGELOG.md,运行 npm run checknpm pack --dry-run

  2. 确认 npm Trusted Publisher 仍绑定本仓库的 publish.yml,且 GitHub npm Environment 的保护规则与发布权限符合预期;这些属于一次性配置,相关契约变化时才需更新。

  3. 创建与 package.json 一致的 vX.Y.Z GitHub Release。工作流将重新执行发布门禁,并通过 OIDC 发布包及请求生成来源证明。

prepublishOnly 会在手工执行 npm publish 时强制运行类型检查、完整测试和构建。0.x 阶段允许在次版本中调整实验性能力;计划对外稳定后再发布 1.0.0

License

MIT

Available Tools

5 tools
get_api_by_path按路径查询 Swagger 接口A
Read-onlyIdempotent

按精确路径和可选 HTTP Method 实时查询完整接口文档,返回递归 schemaTree 和 flatFields。回答用户时必须明确保留 sourceNotice。

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYesSwagger paths 中的精确接口路径
groupNo多分组文档的精确分组名;只有一个分组时可省略
methodNoHTTP Method;同一路径有多个方法时必须提供
docsUrlYes本次要查询的 doc.html 或 Swagger JSON 完整地址

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already indicate read-only, idempotent, non-destructive, and open-world hints. The description adds real-time query behavior and return structure (schemaTree, flatFields), plus a disclosure requirement. No contradiction.

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, no waste. Purpose and key details (real-time, schemaTree, flatFields, sourceNotice) are front-loaded.

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

Completeness4/5

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

With no output schema, the description covers return type (schemaTree, flatFields) and a behavioral rule. Given the tool's simplicity and annotations covering safety, it is 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?

Schema covers all 4 parameters with descriptions (100% coverage). The description restates 'path' and 'method' but adds usage nuance (e.g., method optional if single, group optional if single group). This provides marginal extra 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 tool's function: querying complete API documentation in real-time by exact path and optional HTTP method. It distinguishes from siblings by focusing on path-based lookup, whereas siblings like list_api_categories or search_apis serve 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 Guidelines2/5

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

No explicit guidance on when to use this tool vs alternatives (e.g., search_apis for fuzzy matching, inspect_api_docs for browsing). The description only mentions a presentation rule (retain sourceNotice) but not selection criteria.

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

get_api_category查询 Swagger 接口分类A
Read-onlyIdempotent

按精确分类名实时查询接口。summary 返回摘要,full 返回请求和递归响应 schema。回答用户时必须明确保留 sourceNotice。

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo页码,从 1 开始
groupNo多分组文档的精确分组名;只有一个分组时可省略
docsUrlYes本次要查询的 doc.html 或 Swagger JSON 完整地址
categoryYesSwagger tags 中的精确分类名
pageSizeNo每页数量,最大 100
detailLevelNo返回摘要或完整接口文档summary

TDQS

A4/5.0
Behavior4/5

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

Annotations declare readOnlyHint=true, destructiveHint=false, etc. The description adds real-time behavior, exact matching, and a retention notice for sourceNotice, providing useful context 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 short (two sentences) and efficiently conveys the tool's purpose. It could be slightly more structured but is concise and front-loaded.

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

Completeness3/5

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

With no output schema, the description omits return value details beyond summary/full. It notes sourceNotice retention, but a more detailed explanation of response structure would improve completeness for a tool with 6 parameters.

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% (all 6 parameters described). The description adds that 'summary' returns abstracts and 'full' returns request/response schemas, enhancing clarity beyond the schema's enum values.

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 queries APIs by exact category name in real-time, with two detail levels (summary/full). It effectively distinguishes itself from sibling tools like list_api_categories and get_api_by_path.

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 mentions real-time querying and detail levels but does not provide explicit guidance on when to use this tool compared to alternatives like search_apis. No exclusions or prerequisites are mentioned.

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

inspect_api_docs检查 Swagger 文档地址A
Read-onlyIdempotent

在用户已明确要求查询、调试、搜索、列出或分析接口文档后,检查 doc.html、Knife4j hash 深链接或 Swagger JSON 地址。不要因为消息中只有 URL 就调用;孤立 URL 应先询问用户意图。调用后实时验证 hash 中的分组、分类和 operationId,返回候选项与 nextAction。nextAction 为 get_api_detail 时,应直接使用已验证的 group/path/method 调用 get_api_by_path。

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo页码,从 1 开始
docsUrlYes本次要查询的 doc.html 或 Swagger JSON 完整地址
pageSizeNo每页数量,最大 100

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, so description adds operational flow: returns candidates and nextAction, and specifies next steps. No contradiction. Adds useful context 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?

Single paragraph, front-loaded with condition for calling. Clear and efficient, though could be slightly more concise.

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?

No output schema, but description mentions return of candidates and nextAction, and covers when to call and next steps. Adequately complete for a read-only inspection tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% (baseline 3). Description adds slight context by noting docsUrl should be complete address (doc.html or Swagger JSON), but no new semantics beyond 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?

Explicitly states it inspects Swagger doc URLs after user explicitly requests query/debug/search/list/analyze. Clearly distinguishes from siblings by focusing on doc inspection.

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?

Provides explicit condition for calling (only after user expresses intent to query/debug/search/list/analyze) and warns against calling on isolated URLs. Gives clear context and exclusions.

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

list_api_categories列出 Swagger 接口分类A
Read-onlyIdempotent

实时读取指定 docsUrl,列出分类及接口数量。回答用户时必须明确保留返回中的 sourceNotice。不会调用业务 API,也不会缓存地址。

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo页码,从 1 开始
groupNo多分组文档的精确分组名;只有一个分组时可省略
docsUrlYes本次要查询的 doc.html 或 Swagger JSON 完整地址
pageSizeNo每页数量,最大 100

TDQS

A4/5.0
Behavior4/5

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

The description reveals behavior beyond annotations: it operates in real-time, does not call business APIs, does not cache, and instructs the agent to retain sourceNotice in responses. Annotations already confirm read-only, idempotent, non-destructive nature. No contradictions.

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

Conciseness5/5

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

Three sentences, each serving a distinct purpose: first explains core function, second gives a user-reply instruction, third clarifies side-effect constraints. No 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?

Given the simple nature and full annotations/schema, the description covers key aspects: real-time retrieval, no caching, no business API calls, and response handling. It does not explicitly mention pagination or what the output format includes, but the schema parameters imply pagination.

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%, so the description adds little new meaning. It restates the purpose from the docsUrl parameter description but does not elaborate on page, group, or pageSize beyond what the schema provides.

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 reads a specified docsUrl and lists categories with interface counts. It distinguishes itself from sibling tools like get_api_category (single category) or search_apis (search) by focusing on listing all categories. The mention of not caching or calling business APIs further clarifies its scope.

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 does not explicitly state when to use this tool vs alternatives. It implies usage for obtaining a category overview, but lacks direct guidance on selecting this over inspect_api_docs or get_api_by_path.

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

search_apis搜索 Swagger 接口A
Read-onlyIdempotent

在指定实时 Swagger 文档中搜索路径、摘要、描述、分类和 operationId。回答用户时必须明确保留 sourceNotice。

ParametersJSON Schema
NameRequiredDescriptionDefault
pageNo页码,从 1 开始
groupNo多分组文档的精确分组名;只有一个分组时可省略
docsUrlYes本次要查询的 doc.html 或 Swagger JSON 完整地址
keywordYes搜索关键词
pageSizeNo每页数量,最大 100

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive hints. The description adds a behavioral note: '回答用户时必须明确保留 sourceNotice' (must keep sourceNotice when answering the user), which is critical for proper response handling. No contradictions 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.

Conciseness5/5

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

The description is two sentences with no wasted words. The first sentence provides the core purpose, and the second adds a specific usage instruction. It is concise and front-loaded.

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 search tool with 5 parameters (2 required) and no output schema, the description covers purpose, scope (real-time Swagger doc), and a behavioral requirement. It lacks a description of the return format or pagination details, but those are partially covered by schema. Overall, it is sufficiently complete for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents each parameter. The description does not add additional parameter-level semantics beyond the schema, maintaining the baseline of 3.

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 '搜索' (search) and the resource 'Swagger 接口', and lists specific searchable fields (path, summary, description, tag, operationId). It also differentiates from sibling tools like inspect_api_docs or get_api_by_path by specifying that the search is across a real-time Swagger document.

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 when searching across Swagger APIs, but does not explicitly state when to use this tool versus alternatives like inspect_api_docs or list_api_categories. No explicit when-not or alternative guidance is provided.

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. 5 tool updatesv0.1.0
    • First observedget_api_by_path
    • First observedget_api_category
    • First observedinspect_api_docs
    • First observedlist_api_categories
    • First observedsearch_apis

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: inspecting docs, listing categories, getting a category, getting by path, and searching. No overlap is present.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern in snake_case (inspect_api_docs, list_api_categories, get_api_category, get_api_by_path, search_apis).

Tool Count5/5

5 tools is well-scoped for exploring Swagger/OpenAPI documentation, covering all key operations without bloat.

Completeness5/5

The set covers inspection, listing categories, reading a category, fetching by path, and searching – a complete surface for browsing API docs.

Maintenance

ActivityMaintained
ResponsivenessSyncing

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to load, parse, and query OpenAPI/Swagger documentation from URLs with intelligent search across endpoints, schemas, and authentication methods. Provides 10 specialized tools for comprehensive API exploration including path details, operation lookups, and multi-criteria search capabilities.
    4
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables Trae IDE to parse and query Swagger/Knife4j API documentation by converting JSON format interface documents into a searchable text format, allowing developers to efficiently retrieve API information through natural language queries.
    -
  • 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/qipeijun/swagger-docs-mcp'

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