Skip to main content
Glama
chanshawoh

yudao-pilot-mcp

by chanshawoh

generate_codegen_sql_tool

Generates MySQL menu SQL and module H2 test SQL based on table configuration, with options to write migration files or apply directly to the database.

Instructions

生成 MySQL 菜单 SQL 与模块 H2 测试 SQL,可选直接写入文件,并按配置决定是否写库。

菜单/字典是否生成由工作区配置 codegen.menu_sql_mode、codegen.dict_sql_mode 控制; 是否允许写库由 codegen.apply_to_database 控制: auto(默认)= 生成 SQL,write_files 写迁移,若 apply_to_database=true 则允许写库; migration_only = 仅生成/写入迁移文件,不执行真实数据库写入; disabled = 不生成对应 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
overwriteNo
table_nameYes
entity_nameNo
module_nameNo
write_filesNo
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

Behavior4/5

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

With no annotations, the description carries full burden. It discloses that SQL generation is controlled by workspace config (codegen.menu_sql_mode, codegen.dict_sql_mode) and that database writing depends on codegen.apply_to_database. This gives insight into side effects and conditional behavior, though details like error handling or what 'write files' entails are missing.

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 a single dense paragraph that front-loads the main purpose. It could be more structured (e.g., using bullet points for modes or parameter explanations) but overall is reasonably concise without excessive redundancy.

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?

Given the tool's complexity (15 parameters, many optional) and lack of schema descriptions, the description does not adequately cover how to use each parameter or their interactions. While the configuration modes are explained, the roles of parameters like entity_name, business_name, and parent_menu_id are left ambiguous. The existence of an output schema is mentioned but not detailed.

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%, so the description must compensate for 15 parameters. It only explains two parameters (backend_module_dir, backend_package_module) with examples. The remaining 13 parameters (e.g., table_name, entity_name, menu_icon) have no description, leaving the agent to infer meaning from names alone.

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?

The description clearly states the tool generates MySQL menu SQL and H2 test SQL for modules, with optional file writing and database update based on configuration. This specific verb-resource combination ('generate SQL') distinguishes it from sibling tools like generate_codegen_scaffold_tool (scaffold generation) or write_mysql_migration_tool (migration writing).

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 explains the behavior in three configuration modes (auto, migration_only, disabled) and how they affect SQL generation and database writing. It provides clear context on when SQL is generated and written, but does not explicitly state when to prefer this tool over alternatives or mention prerequisites.

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