Skip to main content
Glama
chanshawoh

yudao-pilot-mcp

by chanshawoh

Generate Codegen Scaffold

generate_codegen_scaffold
Read-only

Generates read-only backend and frontend code scaffolds for AI to apply, returning file contents and merge operations without writing files or SQL.

Instructions

只读生成前后端代码内容与目标路径,不写文件、不生成 SQL、不写库。

generated_files 由 AI 写入;merge_operations 给出专用合并工具及结构化参数, 错误码和字典增量不作为完整文件返回。不会创建预览目录。

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
table_nameYes
entity_nameNo
module_nameNo
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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only supply readOnlyHint=true, and the description adds meaningful behavioral context beyond that: no file writes, no SQL generation, no DB writes, no preview directory creation, and the important nuance that generated_files is written by the AI while error-code/dict increments are returned as merge operations rather than full files. This is substantive behavioral disclosure.

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?

Information is front-loaded with the read-only constraint and output shape before parameter details, and each sentence conveys a distinct fact. It is dense but not padded, though the mix of behavioral notes and parameter notes could be organized more cleanly.

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?

An output schema exists, so return values need not be explained, yet the description still usefully characterizes the output (generated_files vs merge_operations). For a 13-parameter mutation-adjacent generator, the coverage of key behaviors and tricky parameters is solid, with only the many self-evident-named parameters left implicit.

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 0% for 13 parameters, so the description must compensate. It does so well for the non-obvious ones (field_overrides including the full html_type enum list, backend_module_dir with both 'yudao-module-a/b' and shorthand 'a/b' forms, backend_package_module fallback to module_name), but ~10 parameters (table_name, menu_name, entity_name, module_name, business_name, parent_menu_id, workspace_root, include_*, parent_menu_name) remain undocumented beyond their names.

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?

States a specific verb and resource ('只读生成前后端代码内容与目标路径') and immediately differentiates itself from siblings by negation: it does not write files, does not generate SQL (contrast generate_codegen_sql), and does not write to the DB. An agent can tell it apart from generate_codegen_sql/apply_codegen_sql without opening any schema.

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

Usage Guidelines3/5

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

The description implies usage through its read-only framing and mentions that generated_files are meant to be written by the AI and that merge_operations points to dedicated merge tools (siblings merge_backend_error_codes/merge_frontend_dict_types). However, it never states an explicit when-to-use rule, sequence (e.g. before generate_codegen_sql), or exclusion criteria, so guidance is only implied.

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