Skip to main content
Glama

codegen_render_entity

Renders Java Entity code for JPA or MyBatis-Plus by using a table context, outputting a single Java file for the Entity layer.

Instructions

渲染 Entity 层(JPA @Entity / MybatisPlus @TableName)。需要先调用 codegen_build_context 获取 context。返回单个 java 文件源码。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contextYes从 codegen_build_context 返回的完整模板上下文 dict。包含 className/columns/primaryKeyType/templateCategory 等字段。LLM 应原样传递,可在传入前修改字段以重新渲染。
Behavior3/5

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

No annotations are provided, so the description must fully disclose behavior. It mentions the output (single Java file source) and dependency on a prerequisite, but doesn't detail error handling or side effects. Adequate but not rich.

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 sentences with no wasted words. It front-loads the purpose, then states the prerequisite, then the output. Highly efficient.

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 has only one parameter (well-documented in schema), no output schema, and a simple purpose, the description covers the prerequisite, output, and core functionality. Missing some error context but sufficient for typical use.

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 100% and the schema's parameter description already explains the context object well. The tool description adds minimal extra meaning beyond referencing the prerequisite, so a baseline score of 3 is appropriate.

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 renders the Entity layer (JPA @Entity / MybatisPlus @TableName) and returns a single Java file source. It distinguishes from sibling tools like codegen_render_controller by specifying 'Entity层'.

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 explicitly states a prerequisite: '需要先调用 codegen_build_context 获取 context', guiding the agent on the required prior step. It doesn't specify when not to use, but the context is clear.

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