Skip to main content
Glama
zhanghaha416

yapi-mcp-zhh

by zhanghaha416

yapi_update_advanced_mock

Overwrite an interface's advanced mock script in YApi to modify mockJson, httpCode, or delay. Authenticate via login to bypass token whitelist restrictions and save updated mock behavior.

Instructions

覆盖保存高级 Mock 脚本。官方插件接口不在项目 token 白名单里,必须走登录态。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dryRunNo
enableNo
projectIdNo
mockScriptYesYApi 高级 Mock JS,可改 mockJson / httpCode / delay
interfaceIdYes
Install Server

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations provided, the description carries the full disclosure burden. It reveals the two moost critical behavioral traits — the operation overwrites the existing script ('覆盖保存') and requires login-session auth rather than a project token. It does not disclose response shape, validation behavior, or the effect of the enable/dryRun flags.

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 with zero filler: the purpose is front-loaded and the auth constraint earns its place as essential operational context. Every word contributes to correct invocation.

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 5-parametr mutating tool with no annotations, no output schema, and 20% schema coverage, the definition is too sparse. The auth note is valuable, but an agent still cannot correctly interpret dryRun/enable or know what to expect in return.

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

Parameters2/5

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

Schema description coverage is only 20% (only mockScript is described), and the tool description adds no parameter guidance whatsoever. dryRun, enable, projectId, and interfaceId remain undocumented in both schema and description, leaving the agent to guess their semantics.

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 names a specific verb-resource pair: '覆盖保存高级 Mock 脚本' (overwrite-save the advanced Mock script). The qualifier '高级' (advanced) distinguishes it from siblings such as yapi_update_interface_mock and yapi_get_advanced_mock, though it does not explicitly name the alternative it is not.

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 second sentence supplies concrete usage context: the official plugin API is not in the project token whitelist, so this tool must be called through login state. This tells an agent when this path is required and why token-based alternatives would fail, though it stops short of explicitly naming sibling alternatives.

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

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

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