Skip to main content
Glama
chanshawoh

yudao-pilot-mcp

by chanshawoh

Apply Codegen Sql

apply_codegen_sql

Applies codegen menu and derived dictionary configuration to the config database when apply_to_database=true, processing only mode=auto entries without executing arbitrary SQL.

Instructions

按当前表结构和参数重新生成计划,显式应用菜单/派生字典到配置数据库。

必须满足 codegen.apply_to_database=true;仅应用 mode=auto 的部分。 不执行任意 SQL、不写迁移或 H2 文件。与 generate_codegen_sql 使用相同命名参数。 菜单与字典分别提交,可能部分成功;返回各自结果,不提供跨两者的整体回滚。

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.1/5.0
Behavior5/5

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

Annotations only supply readOnlyHint=false, but the description adds substantial behavioral context: no arbitrary SQL is executed, no migrations or H2 files are written, menus and dictionaries are submitted separately and may partially succeed, and there is no cross-cutting rollback. These are exactly the operational traits an agent needs for a mutating tool.

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 purpose and the apply gating are front-loaded, and the following sentences each carry a distinct constraint (no raw SQL, no migrations, partial success, no rollback). It is dense but nearly every clause earns its place; slightly clipped phrasing is the only cost.

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?

An output schema exists, so return-value semantics need not be restated, and the description compensates by noting per-resource results and lack of rollback. However, for a 13-parameter mutation tool the absence of any per-parameter semantics leaves a real gap the sibling reference only partly fills.

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 must carry the parameter burden. It offers only a pointer that the same named parameters as generate_codegen_sql are used, giving no meaning, format, or defaults for any individual field, which is a significant shortfall.

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+resource: regenerate the plan and explicitly apply menu/derived-dictionary entries to the configuration database. It names the sibling generate_codegen_sql and distinguishes itself by being the 'apply' side rather than the generator, so an agent can separate the two 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 Guidelines4/5

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

Gives a concrete prerequisite (codegen.apply_to_database=true) and a scope condition (only the mode=auto portion is applied), which tells the agent when the call will actually act. It does not spell out an explicit 'use X instead' decision path against the other siblings, so it stops short of a 5.

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