Skip to main content
Glama

cocos_add_uitransform

Add a UI transform component to Cocos Creator nodes to enable UI rendering by specifying dimensions and anchor points for proper layout.

Instructions

Attach a cc.UITransform to a node. Required for any UI rendering.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
widthYes
heightYes
anchor_xNo
anchor_yNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that the tool attaches a component and is required for UI rendering, but it does not disclose critical behavioral traits such as whether this is a mutation operation, what permissions are needed, if it has side effects, or how it interacts with existing components. This is a significant gap for a tool with no annotation coverage.

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 extremely concise with two short sentences that are front-loaded and waste no words. Every sentence adds value: the first states the core action, and the second provides essential context about its necessity in UI rendering.

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 complexity (a mutation tool with 6 parameters, no annotations, and 0% schema coverage), the description is incomplete. It lacks details on parameters, behavioral traits, and usage context. While an output schema exists (which might cover return values), the description does not adequately address the gaps in input and behavioral understanding, making it insufficient for effective tool selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters1/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 0%, meaning none of the 6 parameters are documented in the schema. The description does not mention any parameters, their meanings, or how they affect the attachment of cc.UITransform. This fails to compensate for the lack of schema documentation, leaving parameters entirely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Attach') and resource ('a cc.UITransform to a node'), making the purpose specific. It also adds important context about it being 'Required for any UI rendering,' which helps distinguish its role from other sibling tools that add different components or perform different operations, though it doesn't explicitly name alternatives.

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

Usage Guidelines3/5

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

The description implies usage by stating it's 'Required for any UI rendering,' suggesting it should be used when UI elements need to be rendered. However, it does not provide explicit guidance on when to use this tool versus alternatives (e.g., other UI-related tools like cocos_add_button or cocos_add_label), nor does it mention prerequisites or exclusions, leaving some ambiguity.

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/chenShengBiao/cocos-mcp'

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