Skip to main content
Glama
chanshawoh

yudao-pilot-mcp

by chanshawoh

Generate Codegen Sql

generate_codegen_sql
Read-only

Generate menu, derived dictionary, and H2 SQL content and paths for a specified business table, without writing files or applying database changes. Use before explicit menu/dictionary application.

Instructions

只读生成指定业务表的菜单、派生字典和 H2 SQL 内容及路径,不写文件、不写库。

auto / migration_only 均生成对应 SQL,disabled 不生成对应片段。 即使 codegen.apply_to_database=true,本工具也不执行数据库应用。 SQL 文件由 AI 写入;真实菜单/字典应用需显式调用 apply_codegen_sql。 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_iconNo
menu_nameNo
table_nameYes
entity_nameNo
module_nameNo
business_nameNo
parent_menu_idNo
workspace_rootNo
module_menu_iconNo
module_menu_nameNo
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

A4.3/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, but the description adds substantial context: even if codegen.apply_to_database=true the tool will not apply to the database, and SQL files are written by the AI rather than by this tool. This clarifies destructive boundaries beyond the annotation bar.

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?

Purpose and safety constraints are front-loaded and the prose is dense with no filler. The trailing parameter notes read as appended patches rather than a structured parameter section, slightly hurting flow.

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?

With an output schema present, return values need no explanation, and the read-only safety model is well covered. However, for a 13-parameter tool the undocumented majority of inputs leaves an agent without enough guidance to set most arguments correctly.

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 0% across 13 parameters, so the description carries the full burden. Only backend_module_dir and backend_package_module are explained (with accepted format variants), leaving the other 11 parameters undocumented anywhere.

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 (generate) and precise resources (menu, derived dictionary, H2 SQL content and paths) scoped to a named business table. It also distinguishes itself from apply_codegen_sql, which actually applies menu/dictionary changes, so an agent can tell the two apart without opening either schema.

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

Usage Guidelines5/5

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

Explicitly defines when and when-not: it does not write files or the DB, and real menu/dictionary application requires explicitly calling apply_codegen_sql. It also specifies mode behavior (auto/migration_only generate, disabled does not), leaving nothing to inference.

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