Skip to main content
Glama
chanshawoh

yudao-pilot-mcp

by chanshawoh

generate_codegen_scaffold_tool

Generates the initial code scaffold from a database table definition, allowing preview or direct write to the workspace for yudao-vue-pro projects.

Instructions

根据当前上下文生成首版代码骨架,可选择只预览或直接写入工作区。

普通代码文件默认 overwrite=false,写入时若文件已存在会返回 should_stop, 由调用方询问用户是否覆盖;前端字典常量、后端错误码等合并型文件不受此限制。

field_overrides: AI 覆盖字段组件类型,格式为 {"java_field": "html_type"}, 例如 {"lng": "inputNumber", "lat": "inputNumber"}。 可用 html_type 值: input, inputNumber, textarea, editor, select, radio, checkbox, datetime, date, imageUpload, fileUpload。 backend_module_dir: 显式后端目标模块目录,支持 yudao-module-a/yudao-module-b 或 a/b。 backend_package_module: 显式 Java package module 名,例如 b;未传时使用 module_name。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
menu_nameNo
overwriteNo
table_nameYes
entity_nameNo
module_nameNo
write_filesNo
business_nameNo
parent_menu_idNo
workspace_rootNo
field_overridesNo
include_backendNo
include_frontendNo
parent_menu_nameNo
backend_module_dirNo
backend_package_moduleNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description discloses overwrite policy, field_overrides usage, and backend module/path conventions. It could mention prerequisites like database connection, but overall adds valuable behavioral context beyond the schema.

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?

The description is concise with 6 sentences, front-loading the main purpose. It efficiently covers overwrite behavior and key parameters without unnecessary verbosity. Could be improved with bullet points for parameter details.

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?

Given 15 parameters and existing output schema, the description explains core generation behavior and some key parameters. However, it fails to clarify what the generated code skeleton includes (e.g., full project structure? specific files?) and how it relates to sibling tools like write_generated_files_tool, leaving some ambiguity.

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 0%, so the description carries the burden. It explains field_overrides (with valid values), backend_module_dir, and backend_package_module with examples. But many parameters (menu_name, entity_name, module_name, etc.) are left unexplained, leaving gaps for 12 out of 15 parameters.

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 the tool generates a first version code skeleton with preview or write options. It uses a specific verb and resource, but does not explicitly differentiate from siblings like write_generated_files_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 context on preview vs write mode, overwrite behavior, and special handling for merge files. However, it does not specify when to use this tool versus other siblings like generate_codegen_sql_tool or infer_codegen_plan_tool.

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/chanshawoh/yudao-pilot-mcp'

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