Skip to main content
Glama

cocos_add_toggle_container

Attach a radio button group to Cocos Creator nodes so children toggle mutually exclusively, enabling UI controls without manual coding.

Instructions

Attach cc.ToggleContainer (radio group). Children are mutually exclusive.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
allow_switch_offNo

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 full burden. It mentions the behavioral trait of mutual exclusivity ('Children are mutually exclusive'), which is valuable. However, it lacks critical details: whether this is a creation or modification operation, permission requirements, side effects on existing nodes, error conditions, or interaction with the scene graph. For a mutation tool with zero annotation coverage, this is insufficient.

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 (one sentence) and front-loaded with the core action. Every word earns its place: 'Attach' defines the action, 'cc.ToggleContainer' specifies the resource, and the parenthetical adds crucial behavioral context. There is zero redundancy or fluff.

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 tool has 3 parameters with 0% schema coverage, no annotations, and an output schema (which relieves the description from explaining returns), the description is incomplete. It covers the core purpose but misses parameter semantics, usage context, and behavioral details like error handling or scene integration. For a Cocos Creator scene manipulation tool, this leaves significant gaps for an agent.

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?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The tool description adds no information about the three parameters (scene_path, node_id, allow_switch_off). It doesn't explain what a 'scene_path' or 'node_id' refers to, or the effect of 'allow_switch_off'. The description fails to compensate for the complete lack of schema documentation.

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 verb ('Attach') and resource ('cc.ToggleContainer') with additional functional context ('radio group', 'Children are mutually exclusive'). It distinguishes from siblings like 'cocos_add_toggle' by specifying a container/group behavior rather than a single toggle. However, it doesn't explicitly contrast with all sibling tools beyond the general 'add' pattern.

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?

No explicit guidance on when to use this tool versus alternatives is provided. The description implies usage for creating mutually exclusive toggle groups, but doesn't specify prerequisites, dependencies, or when to choose this over other UI components like 'cocos_add_button' or 'cocos_add_slider'. The agent must infer usage from the functional description alone.

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