Skip to main content
Glama

codegen_build_context

Prepares complete template context for code generation from a database table as the first step in the atomic workflow, returning a context dict that can be inspected or modified before rendering.

Instructions

构建代码生成所需的完整模板上下文(不写盘,不渲染)。这是原子代码生成工作流的第一步,后续 codegen_render_* 工具的输入。返回的 context dict 可被 LLM 检视或修改,再传给后续工具。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
connection_idYesDatabase connection ID from db_connect_test
table_nameYesTable name to build context for
databaseNoDatabase name (optional, uses connection default)
template_categoryNoMybatisPlus-Mixed
authorNoZXP
package_nameNocom.example.generated
include_swaggerNo
include_lombokNo
include_mapstructNo
project_pathNoOptional target Spring Boot project path
Behavior4/5

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

With no annotations provided, the description carries full burden. It discloses key behaviors: does not write to disk, does not render, returns a context dict. This is valuable for an agent to understand the non-destructive, preparatory nature of the tool. However, it does not mention error handling or input validation behaviors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences in Chinese, front-loaded with the core purpose and immediately providing workflow context. No redundant information.

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?

Given the tool's role as a context builder and the existence of many sibling tools, the description adequately explains its purpose and position in the pipeline. It mentions the return type and how the context can be used. However, with 10 parameters and no output schema, more detail on the context contents or usage could improve completeness.

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 only 40% (4 of 10 parameters have descriptions). The description does not explain any parameters, leaving the agent to rely on the schema alone. It does not add meaning beyond what the schema provides, failing to compensate for the low coverage.

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 builds the complete template context for code generation without writing to disk or rendering. It also identifies itself as the first step in the atomic code generation workflow, input for subsequent codegen_render_* tools, distinguishing it from sibling render tools.

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 clear context on when to use it (first step of codegen workflow) and how the output is used (inspect or modify before passing to render tools). It implies not to use when you need direct file output, but does not explicitly list alternatives or exclusions.

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/ZhaoXingPeng/DBJavaGenix'

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