Skip to main content
Glama
hizml
by hizml

yapi_save_api

Create or update a YApi API interface. Provide api_id to update an existing API, or omit it to create a new one. Requires project_id and catid.

Instructions

创建或更新 YApi 接口。带 api_id 走更新(/api/interface/up),不带走创建(/api/interface/add)。至少需提供 project_id 与 catid。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descNo接口描述。
pathNo接口路径,例如 /api/foo/bar。
catidYes目标分类 ID。
titleNo接口标题。
api_idNo要更新的接口 ID。提供时为更新;省略时为创建。
methodNoHTTP 方法。
res_bodyNo响应体结构,JSON Schema 字符串。
req_queryNoquery 参数列表。
project_idYes目标项目 ID。
req_headersNo请求头列表。
req_body_typeNo请求体类型。
req_body_otherNo请求体结构,json 类型时为 JSON Schema 字符串。
Behavior2/5

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

With no annotations, the description carries full burden. It discloses only the create/update behavior and required parameters, but lacks details on side effects, authentication, error handling, or return values.

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 Chinese sentence that front-loads the main purpose and required parameters. There is no redundant information.

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?

Given 12 parameters and no output schema, the description lacks guidance on return values, error handling, and conditional parameter usage (e.g., path/method required for creation). It is insufficiently complete 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.

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 key value by explaining the conditional create/update logic tied to api_id, which is not evident from the schema alone.

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 creates or updates a YApi interface, with specific conditions based on api_id. It distinguishes itself from sibling tools like yapi_get_api_details or yapi_search_apis by being the only mutative tool.

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

Usage Guidelines4/5

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

The description provides clear context on when to use create vs update based on api_id, and it identifies required parameters (project_id, catid). However, it does not explicitly exclude use cases or compare with siblings.

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

Install Server

Other Tools

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/hizml/yapi-mcp'

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