Skip to main content
Glama

从声明式节点树构建 UI;失败时补偿本次创建的节点

cocos_ui_build
Destructive

Build UI from a declarative node tree and automatically roll back any created nodes if the operation fails to keep the scene unchanged.

Instructions

从声明式节点树构建 UI;失败时补偿本次创建的节点

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes
projectIdYes
instanceIdNo
operationIdNo
expectedRevisionNo
runtimeInstanceIdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.6/5.0
Behavior4/5

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

Annotations already mark the operation as destructive and non-read-only. The description adds useful behavioral context beyond that by explicitly stating that on failure, nodes created during this operation are compensated/rolled back. It does not describe success behavior or whether existing nodes are modified, but the failure-compensation detail is genuinely additive.

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, front-loaded sentence with no filler, and it packs purpose plus a failure behavior into one compact statement. It loses a point because it exactly duplicates the title rather than using the description space to add differentiating or operational detail.

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?

For a destructive, 6-parameter operation with nested objects and no output schema, this description is too thin to support reliable invocation. It identifies the main input concept and a rollback trait but omits required project context, parameter relationships, and any indication of return values or effects beyond compensation.

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. It hints that 'tree' contains a declarative node tree, but it does not explain projectId, parentId, instanceId, operationId, expectedRevision, or runtimeInstanceId. Only the core 'tree' concept is lightly illuminated; the remaining parameters are left to inference.

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

Purpose2/5

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

Tautological: description restates name/title.

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

Usage Guidelines2/5

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

The description gives no guidance on when to use this tool versus alternatives such as cocos_node_create, cocos_build_start, or cocos_scene_save. There is no mention of prerequisites, ordering, or exclusions, so the agent must infer usage from the name and schema alone.

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