Skip to main content
Glama
chanshawoh

yudao-pilot-mcp

by chanshawoh

Merge Backend Error Codes

merge_backend_error_codes

Merge backend error codes into a Java constants file by assigning numbers, updating existing messages, and grouping entries under a section title.

Instructions

合并后端错误码;relative_path 是相对配置后端仓库的 ErrorCodeConstants.java 路径。

constants 为非空 {name, message} 列表,自动分配编号;同名更新提示并保留编号。 section_title 指定业务分组标题。只修改目标文件及必要的 ServiceErrorCodeRange.java, 不生成普通代码、不处理或删除占位文件。返回实际 changed_files,重复相同输入为空列表。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
constantsYes
relative_pathYes
section_titleYes
workspace_rootYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A3.9/5.0
Behavior5/5

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

With only readOnlyHint=false in annotations, the description fills the gap substantially: it states it modifies only the target file and ServiceErrorCodeRange.java, does not generate ordinary code or delete placeholders, returns changed_files, and produces an empty list for duplicate input. This level of detail on scope, side effects, and idempotency goes well beyond what annotations provide.

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 appropriately sized and front-loaded, opening with the core purpose before parameter details and behavioral constraints. Every sentence adds information and there is no wasted text.

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 write tool with four required parameters, nested constants, and an output schema, the description covers purpose, behavior, and most parameters. It misses the meaning of workspace_root and any prerequisite such as ensuring the backend workspace is configured, which leaves a small completeness gap.

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 description coverage is 0% at the top level, so the description must carry the burden. It explains relative_path (path to ErrorCodeConstants.java relative to the configured backend repo), constants (non-empty {name, message} list, auto-numbering, same-name update behavior), and section_title (business group title), but leaves workspace_root completely undocumented.

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 specific verb+resource: '合并后端错误码' (merge backend error codes), and clarifies the target file via relative_path. It distinguishes itself from the frontend sibling implicitly by the 'backend' domain, but never names an alternative tool to make the contrast explicit.

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 explains what the tool does but gives no guidance on when to use it versus alternatives such as merge_frontend_dict_types or the codegen tools. Constraints like 'not generating ordinary code' describe behavior rather than helping an agent select this tool.

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