Skip to main content
Glama

YApi MCP Bridge

Ein YApi-Server basierend auf dem Model Context Protocol (MCP), der es MCP-fähigen KI-Clients ermöglicht, YApi-Schnittstellen abzufragen, zu durchsuchen, zu erstellen und zu aktualisieren.

Funktionen

Derzeit werden die folgenden Tools bereitgestellt:

Tool

Zweck

Typ

yapi_get_project

Projektdetails abrufen

Nur lesen

yapi_get_interface

Kompakte Schnittstellendefinition abrufen, optional mit vollständigen Rohdaten

Nur lesen

yapi_list_categories

Projektschnittstellen-Kategorien abrufen

Nur lesen

yapi_list_interfaces

Projektschnittstellen seitenweise abrufen, filterbar nach Status oder Tags

Nur lesen

yapi_list_category_interfaces

Schnittstellen einer Kategorie seitenweise abrufen

Nur lesen

yapi_search_interface

Schnittstellen nach Titel, Pfad oder HTTP-Methode durchsuchen

Nur lesen

yapi_create_category

Schnittstellenkategorie erstellen

Schreiben

yapi_create_interface

Schnittstelle erstellen

Schreiben

yapi_update_interface

Schnittstelle aktualisieren

Schreiben

Der Server stellt keine Lösch-Tools bereit, um zu vermeiden, dass KI-Clients versehentlich irreversible Operationen ausführen.

Related MCP server: YAPI MCP PRO

Installation mit npm

Kein Klonen des Repositories erforderlich, direkt ausführbar:

npx -y yapi-mcp-bridge

Auch eine globale Installation ist möglich:

npm install -g yapi-mcp-bridge
yapi-mcp-bridge

Nach der globalen Installation können Sie mit dem folgenden Befehl die Tool-Aufrufstatistiken anzeigen:

yapi-mcp-stats

Installation aus dem Quellcode

Systemvoraussetzungen

  • Node.js 18 oder höher

  • Eine erreichbare YApi-Instanz

  • Ein YApi-Cookie mit Zugriffsrechten für das entsprechende Projekt

Für die Ausführung aus dem Quellcode ist außerdem pnpm 10 oder höher erforderlich. Unter macOS können Node.js und pnpm mit Homebrew installiert werden:

brew install node pnpm

Abhängigkeiten installieren

Nach dem Wechsel in das Projektverzeichnis ausführen:

pnpm install

YApi konfigurieren

Die Beispiel-Umgebungsvariablen kopieren:

cp .env.example .env

.env bearbeiten:

YAPI_HOST=https://yapi.example.com
YAPI_COOKIE=_yapi_token=xxx;_yapi_uid=xx;

Parameterbeschreibung:

  • YAPI_HOST: Adresse des YApi-Dienstes, nur Protokoll und Domain angeben, nicht /api.

  • YAPI_COOKIE: Die vollständige Cookie-Zeichenfolge für den Zugriff auf YApi.

  • YAPI_LOG_FILE: Optionaler Pfad zur Logdatei, Standard ist ~/.yapi-mcp/logs/yapi-mcp.log.

Nach der Anmeldung bei YApi können Sie im Network-Panel der Browser-Entwicklertools eine beliebige YApi-Anfrage auswählen und das Cookie aus den Request Headers kopieren. Das Cookie entspricht den Anmeldeinformationen; es sollte nicht in Git committet oder mit anderen geteilt werden. Dieses Projekt ignoriert .env standardmäßig.

Server starten

Im Projektstammverzeichnis ausführen:

pnpm start

Dies ist ein stdio-MCP-Server. Nach dem direkten Start gibt es keine normale HTTP-Seite und es werden keine interaktiven Eingabeaufforderungen ausgegeben; er wartet darauf, dass MCP-Clients über die Standardeingabe/-ausgabe kommunizieren.

Nach erfolgreichem Start gibt der Server ähnliche Informationen über stderr aus, ohne das für die MCP-Kommunikation verwendete stdout zu beeinträchtigen:

[yapi-mcp] server started (stdio), tools=9, log=~/.yapi-mcp/logs/yapi-mcp.log

Tests ausführen:

pnpm test

MCP-Clients anbinden

Bei Verwendung des npm-Pakets fügen Sie in einem Client, der stdio-MCP-Server unterstützt, die folgende Konfiguration hinzu:

{
  "mcpServers": {
    "yapi": {
      "command": "npx",
      "args": [
        "-y",
        "yapi-mcp-bridge"
      ],
      "env": {
        "YAPI_HOST": "https://yapi.example.com",
        "YAPI_COOKIE": "_yapi_token=xxx;_yapi_uid=xx;"
      }
    }
  }
}

Wenn Sie aus dem Quellcode starten, können Sie weiterhin die absolute Node.js-Pfadkonfiguration verwenden:

{
  "command": "node",
  "args": ["/absolute/path/to/yapi-mcp-server/src/index.js"],
  "env": {
    "YAPI_HOST": "https://yapi.example.com",
    "YAPI_COOKIE": "_yapi_token=xxx;_yapi_uid=xx;"
  }
}

Nach der Änderung der Konfiguration den MCP-Client neu starten oder neu laden. Der Client sollte 9 Tools finden, die mit yapi_ beginnen.

Verwendung

Nach der Anbindung können Sie den KI-Client direkt in natürlicher Sprache anweisen, YApi zu bedienen.

Projekte und Schnittstellen abfragen

获取 YApi 项目 1922 的详情。
列出 YApi 项目 1922 的所有接口分类。
在 YApi 项目 1922 中搜索路径包含 /order 的接口,并获取匹配接口的常用定义。

yapi_get_interface gibt standardmäßig nur die folgenden häufig verwendeten Informationen zurück:

  • Schnittstellen-ID, Titel, HTTP-Methode und Pfad

  • Schnittstellenbeschreibung

  • Path-, Query-, Header- und Body-Eingabeparameter

  • Antworttyp und Antwortinhalt

Wenn Sie YApi-Metadaten untersuchen oder die Rohantwort abrufen möchten, können Sie ausdrücklich die Verwendung von full: true anfordern:

获取 YApi 接口 5001 的原始全量数据。

Schnittstellenkategorie erstellen

在 YApi 项目 1922 中创建一个名为“订单管理”的接口分类。

Schnittstelle erstellen

在 YApi 项目 1922、分类 3001 中创建接口:
标题为“创建订单”,方法为 POST,路径为 /orders,
请求体类型为 JSON,请求示例为 {"productId": 1001, "quantity": 2},
响应示例为 {"id": 9001, "status": "created"}。

Pflichtparameter beim Erstellen einer Schnittstelle:

Parameter

Beschreibung

projectId

YApi-Projekt-ID

categoryId

Schnittstellenkategorie-ID

title

Schnittstellentitel

path

Schnittstellenpfad, beginnend mit /

method

HTTP-Methode, z. B. GET, POST

requestBody und responseBody müssen als Zeichenfolgen übergeben werden. Wenn der Inhalt JSON oder JSON Schema ist, muss er ebenfalls zuerst in eine Zeichenfolge serialisiert werden.

Schnittstelle aktualisieren

把 YApi 接口 5001 的标题修改为“查询订单详情”,状态修改为 done,并添加 order 标签。

Zum Aktualisieren einer Schnittstelle müssen nur die Schnittstellen-ID und die zu ändernden Felder angegeben werden; nicht angegebene Felder werden nicht an YApi gesendet.

Protokollierung und Aufrufstatistiken

Der Server schreibt Protokolle standardmäßig in:

~/.yapi-mcp/logs/yapi-mcp.log

Die Protokolle verwenden das JSON-Lines-Format, ein Ereignis pro Zeile. Zum Beispiel:

{"timestamp":"2026-08-21T08:00:00.000Z","event":"tool_call","tool":"yapi_get_interface","status":"success","durationMs":128}

Die Tool-Protokolle erfassen nur den Toolnamen, den Aufrufstatus und die Dauer, nicht die Aufrufparameter, Schnittstelleninhalte, Cookies oder andere Anmeldeinformationen.

Wenn die Protokolle nach dem Anhängen mehr als 1000 Einträge umfassen, löscht der Server automatisch die ältesten 300 Einträge, um ein unbegrenztes Wachstum der Protokolldatei zu vermeiden.

Häufigkeit, Erfolgszahl, Fehlerzahl und durchschnittliche Dauer der Tool-Aufrufe anzeigen:

# 全局安装
yapi-mcp-stats

# 从源码运行
pnpm stats

Über YAPI_LOG_FILE kann der Speicherort der Protokolle geändert werden. Bei relativen Pfaden wird relativ zum Startverzeichnis des Servers aufgelöst; in MCP-Clients wird die Konfiguration eines absoluten Pfads empfohlen.

Häufig gestellte Fragen

„Bitte anmelden“ oder keine Berechtigung

Überprüfen Sie Folgendes:

  • Ob YAPI_COOKIE vollständig und nicht abgelaufen ist.

  • Ob der Benutzer, dem das aktuelle Cookie gehört, Zugriffs- oder Bearbeitungsrechte für das Projekt hat.

  • Ob der MCP-Server nach der Änderung des Cookies neu gestartet wurde.

Client findet den Server nicht

  • Stellen Sie sicher, dass src/index.js in der MCP-Konfiguration einen absoluten Pfad verwendet.

  • Stellen Sie sicher, dass command auf eine ausführbare Node.js-Instanz verweist.

  • Führen Sie im Projektverzeichnis pnpm test aus, um zu bestätigen, dass Abhängigkeiten und Laufzeitumgebung in Ordnung sind.

Änderungen an .env werden nicht wirksam

.env wird standardmäßig aus dem aktuellen Arbeitsverzeichnis des Servers geladen. Beim Start im Terminal führen Sie pnpm start im Projektstammverzeichnis aus; beim Start über einen MCP-Client wird empfohlen, YAPI_HOST und YAPI_COOKIE explizit über env in der Konfiguration zu übergeben.

Projektstruktur

src/
├── handlers/       # MCP 工具 handler 与 YApi 方法映射
├── tools/          # 工具定义、Zod 输入输出 Schema
├── index.js        # stdio Server 入口
├── server.js       # McpServer 注册
└── yapi.js         # YApi HTTP API 封装
test/               # 单元测试与 MCP 注册测试

Sicherheitshinweise

  • Committen Sie weder .env noch das YApi-Cookie.

  • Schreib-Tools ändern tatsächlich YApi-Daten; vor der Ausführung sollten Projekt-ID, Kategorie-ID und Schnittstellen-ID bestätigt werden.

  • Es wird empfohlen, ein YApi-Konto mit möglichst geringen Berechtigungen zu verwenden.

  • Standardmäßig werden Protokolle unter .yapi-mcp/logs/ im Benutzerverzeichnis gespeichert, nicht im npm-Installationsverzeichnis.

Available Tools

9 tools
yapi_create_categoryA

在项目中创建接口分类

NameRequiredDescriptionDefault
nameYes分类名称
projectIdYes项目 ID
descriptionNo分类描述

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

The description is consistent with annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true) and simply states a create operation. It does not contradict annotations but also adds no extra behavioral context such as side effects, permission requirements, or response details. The annotations already cover the basic safety profile, so a 3 is appropriate given the minimal additional disclosure.

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 a single, compact sentence with no filler or redundancy. It is fully front-loaded and gets straight to the point, demonstrating excellent conciseness for a simple create operation.

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 create tool with a full input schema, required-field marking, and an output schema (as indicated by context signals), the description is adequate. It does not explain return values, but the presence of an output schema covers that. The main gap is the lack of usage guidance, but that is already scored separately. Overall, the description is nearly complete for its simplicity.

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% — all three parameters (name, projectId, description) have individual descriptions. The tool description does not add any extra meaning beyond the schema, 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 clearly states the verb 'create' (创建) and the resource 'API category' (接口分类) within a project context. It is specific enough to distinguish from sibling tools like yapi_create_interface, leaving no ambiguity about what the tool does.

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?

The description does not provide any guidance on when to use this tool versus alternatives. It does not mention any prerequisites, exclusions, or explicit comparisons to sibling tools. The only context is the inherent nature of the tool name, which implies category creation, but no directed usage advice is given.

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

yapi_create_interfaceB

创建 YApi 接口,支持请求参数、请求体、响应体、状态和标签

NameRequiredDescriptionDefault
pathYes接口路径
tagsNo接口标签
titleYes接口标题
methodYesHTTP 方法
statusNo接口状态
messageNo本次修改说明
markdownNoMarkdown 格式的接口说明
apiOpenedNo是否允许公开访问
projectIdYes项目 ID
categoryIdYes分类 ID
pathParamsNoPath 参数
descriptionNo接口描述
requestBodyNoJSON、文本或 XML 请求体;JSON Schema 也以字符串传入
requestFormNoform 请求参数
requestQueryNoQuery 参数
responseBodyNo响应示例或 JSON Schema,以字符串传入
requestHeadersNo请求 Header
requestBodyTypeNo请求体类型
responseBodyTypeNo响应体类型
requestBodyIsJsonSchemaNo请求体是否为 JSON Schema
responseBodyIsJsonSchemaNo响应体是否为 JSON Schema

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so the agent knows this is a non-destructive write operation. The description adds a list of supported features but does not disclose additional behavioral traits such as permissions required, side effects, or idempotency. Since annotations cover the basic safety profile, the description provides marginal extra 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 a single, front-loaded sentence with zero wasted words. It immediately states the primary action and lists the key supported facets. This is an excellent example of conciseness.

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

Completeness2/5

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

For a tool with 21 parameters and 5 required ones, the description is extremely sparse. It does not highlight required fields, provide examples, or explain how to structure the request. While an output schema exists, the description lacks crucial orientation an agent needs to correctly invoke this complex tool. The minimalism leaves major 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?

Schema description coverage is 100%, so every parameter has a description in the schema. The tool description lists categories (request parameters, body, response, status, tags) but does not add meaning to individual parameters beyond what the schema already documents. Baseline 3 is appropriate when the schema does the heavy lifting.

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 states a clear verb ('创建' = create) and resource ('YApi 接口' = YApi interface), and lists supported aspects (request parameters, body, response, status, tags). It is unambiguous and distinct from sibling tools like yapi_update_interface, though it does not explicitly name alternatives.

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?

There is no guidance on when to use this tool versus alternatives. No mention of prerequisites, conditions that favor this over yapi_update_interface, or any exclusions. The description only states what it does, not when to use it.

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

yapi_get_interfaceA
Read-only

根据接口 ID 获取方法、路径、描述、入参和出参;可选返回原始全量数据

NameRequiredDescriptionDefault
idYes接口 ID
fullNo是否返回 YApi 原始全量数据,默认 false

Output Schema

NameRequiredDescription
resultYes

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, so the read-only nature is covered. The description adds value by disclosing the optional `full=true` behavior that returns raw YApi data instead of the standard subset, which is a meaningful behavioral distinction beyond the schema. It does not contradict annotations and provides useful 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 a single, front-loaded sentence that immediately states the core function and the optional modifier. There is zero redundancy, and every phrase earns its place. It is short while still being informative.

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 tool is a simple getter with a rich output schema (not needing return-type explanations), the description fully covers what an agent needs: the input (ID) and the two modes (standard vs full). No prerequisites, side effects, or hidden behaviors are left undisclosed, and annotations cover the read-only guarantee.

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 both parameters are already documented with descriptions. The tool description essentially restates what the schema says (ID for lookup, full for raw data) without adding syntax, formatting, or edge-case details. Baseline 3 applies since the schema carries the semantic weight.

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 a specific verb ('get') and resource ('interface') and enumerates exactly what is returned (method, path, description, input/output parameters). It also mentions the optional full data flag, making it clear this is a targeted retrieval tool. The '根据接口 ID' clause distinguishes it from list/search siblings by requiring a specific ID.

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 a specific interface ID is already known, but it does not explicitly state when to use this over siblings like yapi_list_interfaces or yapi_search_interface. No exclusions or alternatives are named, leaving the agent to infer context from the sibling list. This is the weakest area.

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

yapi_get_projectA
Read-only

获取 YApi 项目详情,包括基本路径、环境和成员等信息

NameRequiredDescriptionDefault
idYes项目 ID

Output Schema

NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

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

The annotations already declare readOnlyHint=true, so the agent knows it's a safe read. The description adds value beyond that by disclosing the specific fields returned (base path, environment, members). No contradictions with annotations exist, and it provides useful context about the operation's output scope.

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 a single concise sentence that front-loads the core purpose and details. Every word carries meaning; there is no fluff or redundancy. This is an ideal length for a simple GET tool.

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 tool's simplicity (one parameter, no nested objects) and the existence of an output schema (which reduces the need to explain return values), the description covers everything an agent needs: the resource type and the key fields it can expect. No critical information is missing.

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%—the parameter 'id' already has a description ('项目 ID'). The tool description does not add any additional meaning about the parameter beyond what the schema provides. Per guidelines, when coverage is high, 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 states a specific verb ('获取' = get) and resource ('项目详情' = project details), and lists the exact information returned (base path, environment, members). This clearly distinguishes it from sibling tools that deal with interfaces/categories, so an agent can select it without ambiguity.

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 makes the tool's purpose unambiguous: retrieve project-level details. While it doesn't explicitly state when not to use it, the specificity (base path, environment, members) implies usage when those are needed, and sibling tools are clearly for different resources (interfaces, categories). No exclusions are given, but 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.

yapi_list_categoriesA
Read-only

获取项目下的接口分类列表

NameRequiredDescriptionDefault
projectIdYes项目 ID

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the description does not need to state it's a read operation. The description adds no extra behavioral context beyond the purpose (e.g., return format, pagination, or any side effects), but this is acceptable given the read-only nature and the existence of an output schema. It does not contradict annotations, so a 3 is appropriate.

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 a single, front-loaded sentence that states the purpose directly with zero unnecessary words. It efficiently conveys the core action and scope without any redundant context.

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 one parameter and an existing output schema, the description is sufficient to understand what the tool does and how to use it. The only gap is the lack of usage guidance relative to siblings, but that is covered under the usage_guidelines dimension. The description is otherwise complete for an agent to call the tool correctly.

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%, with the only parameter projectId fully documented in the schema. The description does not add any parameter-specific details beyond what the schema provides, so the baseline of 3 applies. The description's mention of '项目下' (under project) aligns with the projectId parameter but adds no new semantic value.

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 (获取/get), the resource (接口分类列表/category list), and the scope (项目下/under project). It is distinct from siblings like yapi_list_category_interfaces (interfaces within a category) and yapi_list_interfaces (interfaces), so an agent can easily differentiate them without opening schemas.

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?

The description provides no guidance on when to use this tool versus alternatives. It does not mention exclusions, prerequisites, or specific conditions that would select this tool over siblings such as yapi_list_category_interfaces or yapi_search_interface. The usage is only implied by the tool name and description, which is insufficient for an agent deciding between similar tools.

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

yapi_list_category_interfacesA
Read-only

分页获取指定分类下的接口列表,可按状态或标签筛选

NameRequiredDescriptionDefault
tagNo按标签筛选
pageNo页码
limitNo每页数量
statusNo按接口状态筛选,例如 done 或 undone
categoryIdYes分类 ID

Output Schema

NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior4/5

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

Annotations already provide readOnlyHint=true, covering safety. The description adds that the operation is paginated ('分页获取') and supports filtering by status or tag, which are behavioral traits beyond the schema. It does not go into details like auth or error behavior, but with read-only annotations, the bar is lower, and the pagination disclosure is valuable for an agent to manage paging.

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 a single, front-loaded sentence that states the core action and key filters. Every word earns its place; there is no redundancy or filler.

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 that an output schema exists (so return structure is already defined), a required parameter is specified in the schema, and readOnlyHint is present, the description covers the essential operational context: it is a paginated, category-scoped interface list with optional filters. It lacks usage guidance but that is handled in another dimension; for a list tool, this is adequately 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 coverage is 100%, and each parameter already has a description. The description mentions filtering by status or tag, which essentially repeats the schema. It adds minimal new meaning, such as grouping the filters, but does not explain value formats or relationships beyond what the schema provides. This meets the baseline for high schema 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 clearly states the tool's purpose: a paginated interface list scoped to a specific category, with optional status or tag filters. It names the resource (interfaces), the scope (category), and the operation (paged retrieval), which distinguishes it from sibling tools like yapi_list_interfaces (which likely lists all interfaces) and yapi_search_interface (which searches by keyword).

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 context (it is for interfaces under a category), but it does not explicitly mention when to use this tool versus alternatives such as yapi_list_interfaces or yapi_search_interface. There are no 'when not to use' statements or references to sibling tools, leaving the selection partially to inference.

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

yapi_list_interfacesB
Read-only

分页获取项目下的接口列表,可按状态或标签筛选

NameRequiredDescriptionDefault
tagNo按标签筛选
pageNo页码
limitNo每页数量
statusNo按接口状态筛选,例如 done 或 undone
projectIdYes项目 ID

Output Schema

NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, covering the safety profile. Beyond that, the description only restates the filtering capability already visible in the schema parameters. It does not disclose any side effects, limits, or behavioral nuances such as response ordering, pagination semantics, or potential performance considerations. With annotations absorbing the safety disclosure, the description adds almost no new 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?

A single, well-structured sentence that immediately conveys the tool's purpose and key capabilities. No filler, no redundancy, and the core function is front-loaded. It is appropriately sized for the tool's simplicity.

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 paginated list tool, the description combined with a full schema and an output schema covers everything an agent needs to invoke it correctly. The description implies the project scope via '项目下', and pagination/filter parameters are well-documented in the schema. No critical information is missing for a tool of this complexity.

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 covers 100% of parameters with descriptions, so the baseline is 3. The description mentions filtering by status or tag, which aligns with the 'status' and 'tag' parameters but adds no additional meaning beyond the schema. For pagination (page/limit) and projectId, the schema already provides adequate detail. The description does not compensate for any gaps, but none exist.

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 a specific verb ('分页获取' = paginated fetch), a specific resource ('项目下的接口列表' = interface list under project), and mentions filtering by status or tag. This distinguishes it from tools like yapi_get_interface (single) and yapi_list_categories (categories), though it does not explicitly name siblings to differentiate. The project-level scope is clear and distinct from category-level listings.

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 establishes a clear context: this is for paginated listing of interfaces under a project, with optional status/tag filters. However, it does not provide any explicit guidance on when to use this tool versus alternatives like yapi_list_category_interfaces or yapi_search_interface. No exclusions or alternative routing are mentioned, leaving some inference to the agent.

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

yapi_search_interfaceA
Read-only

根据标题、路径或 HTTP 方法搜索项目中的 YApi 接口,不区分大小写

NameRequiredDescriptionDefault
keywordYes搜索关键词,例如活动详情或 /order/list
projectIdYes项目 ID

Output Schema

NameRequiredDescription
resultYes

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 openWorldHint=true, covering the read-only and non-cacheable nature. The description adds specific behavioral details beyond annotations: it searches across title, path, and HTTP method, and is case-insensitive. This provides the agent with meaningful search semantics that annotations do not convey, without 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?

The description is a single, efficient sentence that front-loads the purpose and includes all necessary scope and behavior (search criteria and case-insensitivity). There is no redundancy or filler; every clause contributes value.

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 search tool with two required parameters and an output schema, the description covers the essential behavioral aspects: what is searched, how, and the case-insensitivity. The output schema presumably details return structure, so the description need not elaborate. No critical information is missing for an agent to invoke it correctly.

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%, and the schema already describes both parameters with type and examples (e.g., keyword: '活动详情或 /order/list'). The description does not add additional semantic meaning beyond what the schema provides; it neither enhances nor repeats parameter details. Given the high 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 action (search), the resource (YApi interfaces within a project), and the criteria (by title, path, or HTTP method). It also notes case-insensitivity, distinguishing it from listing tools like yapi_list_interfaces that simply enumerate interfaces. The verb-resource-criteria combination is specific and 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?

The description implies usage: use this when you need to find an interface by keyword rather than listing all interfaces. It gives concrete example keywords ('活动详情' or '/order/list') that suggest appropriate search inputs. However, it does not explicitly state when not to use it (e.g., when you already have an interface ID) or mention alternatives. The context is clear, but exclusions are absent.

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

yapi_update_interfaceA
Idempotent

按接口 ID 更新 YApi 接口;只传需要修改的字段

NameRequiredDescriptionDefault
idYes接口 ID
pathNo接口路径
tagsNo接口标签
titleNo接口标题
methodNoHTTP 方法
statusNo接口状态
messageNo本次修改说明
markdownNoMarkdown 格式的接口说明
apiOpenedNo是否允许公开访问
categoryIdNo分类 ID
pathParamsNoPath 参数
descriptionNo接口描述
requestBodyNoJSON、文本或 XML 请求体;JSON Schema 也以字符串传入
requestFormNoform 请求参数
requestQueryNoQuery 参数
responseBodyNo响应示例或 JSON Schema,以字符串传入
requestHeadersNo请求 Header
requestBodyTypeNo请求体类型
responseBodyTypeNo响应体类型
requestBodyIsJsonSchemaNo请求体是否为 JSON Schema
responseBodyIsJsonSchemaNo响应体是否为 JSON Schema

Output Schema

NameRequiredDescription
resultYes

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=true, and destructiveHint=false. The description adds the key behavioral detail that only provided fields are updated and others remain unchanged, which goes beyond the annotations. 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?

Single, focused sentence that front-loads the action and the key usage rule. No filler, appropriately concise.

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

Completeness3/5

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

For a tool with 21 parameters and complex nested schema, the description is minimal. It relies on the comprehensive schema for parameter details. It doesn't mention prerequisites like needing the existing interface state, but the required id and the general update guidance are adequate for basic use. However, it could offer more guidance on handling groups of related parameters (e.g., requestBody vs requestForm).

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 each parameter has a description in the schema. The description adds a general principle for using parameters (only pass fields to modify) but does not add per-parameter specifics, so it meets 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?

States '按接口 ID 更新 YApi 接口' (update YApi interface by interface ID), a clear verb+resource. It is distinct from sibling tools like create, get, list, and search, so an agent can distinguish it.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

Gives the guideline '只传需要修改的字段' (only pass fields to modify), which clarifies partial update behavior. However, it does not explicitly mention when to use this tool over alternatives, such as creating a new interface or fetching one, leaving some inference to the agent.

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.

  1. 9 tool updatesv1.0.0
    • First observedyapi_create_category
    • First observedyapi_create_interface
    • First observedyapi_get_interface
    • First observedyapi_get_project
    • First observedyapi_list_categories
    • First observedyapi_list_category_interfaces
    • First observedyapi_list_interfaces
    • First observedyapi_search_interface
    • First observedyapi_update_interface

TDQS

A3.9/5.0

Scored across 9 tools

Disambiguation5/5

Each tool targets a distinct resource and action: project details, interface retrieval by ID, category listing, interface listing (all or by category), search, and CRUD for categories/interfaces. The overlap between list_interfaces and list_category_interfaces is resolved by clear filtering semantics, so no ambiguity exists.

Naming Consistency5/5

All tools follow a strict 'yapi_<verb>_<noun>' pattern using snake_case (e.g., yapi_get_project, yapi_create_interface). The verb-noun ordering is uniform, and each name clearly reflects the operation and resource, making the set highly predictable.

Tool Count5/5

With 9 tools, the server is well-scoped for a YApi bridge covering project info, category management, and interface lifecycle. Each tool serves a distinct purpose without redundancy, and the count falls comfortably within the ideal 3-15 range.

Completeness3/5

The surface covers create, read, and update for interfaces, plus create and list for categories, but lacks delete operations for both interfaces and categories. This is a notable gap for full lifecycle management, though the core workflows (viewing, searching, and editing) are supported.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables interaction with YApi API management platform through natural language, allowing automated interface management including creating/updating APIs, managing categories, importing data, and retrieving project information.
    15 npm
    9
    GPL 3.0
  • A
    license
    Not graded
    quality
    F
    maintenance
    Enables direct interaction with YApi API management platforms from AI editors like Cursor and Claude Desktop, providing complete interface lifecycle management including browsing, creating, updating, and deleting API documentation.
    23 npm
    21
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server for YApi that enables LLMs to manage API interfaces, projects, and categories through natural language, supporting multiple projects and path fuzzy matching.
    6 npm
    GPL 3.0