Skip to main content
Glama

yapi_add_interface

Add a new API interface definition to YAPI by specifying the title, category ID, path, method, and project ID to register endpoints in your API platform.

Instructions

在 YAPI 中新增一个接口定义

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descNo接口描述
pathYes接口路径
catidYes接口分类 ID
titleYes接口标题
methodYes请求方法(GET, POST, PUT, DELETE 等)
statusNo接口状态
res_bodyNo响应体内容
req_queryNoQuery 参数列表
project_idYes项目 ID
req_headersNo请求 Header 列表
req_body_typeNo请求体类型
res_body_typeNo响应体类型
req_body_otherNo其他请求体内容

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description carries full disclosure burden. '新增' implies a write/create mutation, but the description says nothing about side effects, required permissions, idempotency, or what is returned on success, which is a significant gap for a creation tool.

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?

A single short sentence with the action front-loaded and zero waste. It is efficient, though arguably terse enough that it tips into under-specification rather than optimal 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 13-parameter creation tool with no annotations and no output schema, the description is far too thin. It omits required-field expectations, creation side effects, and any guidance on the many optional body/query/header fields, leaving the agent to rely solely on the schema.

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 all 13 parameters (title, catid, path, method, project_id, res_body, etc.) are already documented in the schema. The description adds no extra semantics beyond that, so the baseline of 3 applies.

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 gives a specific verb (新增 / add) and resource (接口定义 / interface definition) in YAPI, so the core action is unambiguous. However, it offers no differentiation from siblings like yapi_update_interface or yapi_add_category, leaving the agent to infer the boundary itself.

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 when-to-use guidance, no mention of prerequisites (e.g. project/category must already exist), and no reference to alternative tools such as yapi_update_interface or yapi_import_data. The agent must guess the invocation context entirely.

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