Skip to main content
Glama

cocos_stack_horizontally

Arrange child nodes horizontally in Cocos Creator layouts with configurable spacing, padding, and vertical alignment options.

Instructions

cc.Layout type=HORIZONTAL — children arrange left-to-right.

align here is the cross-axis: top/center/bottom. Returns the Layout component id.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
spacingNomd
paddingNolg
alignNotop

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the return value ('Returns the Layout component id'), which is helpful. However, it doesn't disclose whether this creates a new layout or modifies an existing one, what permissions or prerequisites are needed, whether it's destructive or read-only, or any rate limits. The behavioral context is minimal for a tool that likely modifies scene structure.

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 and well-structured. Three brief sentences cover the core functionality, parameter clarification, and return value with zero wasted words. It's appropriately sized for the tool's complexity and front-loads the most important information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 5 parameters with 0% schema description coverage and no annotations, the description is incomplete. It clarifies one parameter and mentions the return value (though an output schema exists). However, it doesn't explain the tool's behavioral impact (creation vs modification, permissions needed), doesn't cover 4 of 5 parameters, and provides minimal usage context. For a scene manipulation tool, this leaves significant gaps in understanding.

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 0%, so the description must compensate. It provides valuable semantic clarification for the 'align' parameter ('``align`` here is the cross-axis: ``top``/``center``/``bottom``'), which isn't in the schema. However, it doesn't explain the other 4 parameters (scene_path, node_id, spacing, padding) or their expected formats/values. The description adds some value but doesn't fully compensate for the schema's lack of descriptions.

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 tool's purpose: 'cc.Layout type=HORIZONTAL — children arrange left-to-right.' This specifies the verb (arrange children horizontally) and resource (Layout component). It distinguishes from its sibling 'cocos_stack_vertically' by specifying horizontal vs vertical arrangement. However, it doesn't explicitly mention that this creates or modifies a layout, which could be more specific.

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 provides no guidance on when to use this tool versus alternatives. While it distinguishes from 'cocos_stack_vertically' by specifying horizontal arrangement, it doesn't mention when to choose horizontal stacking over vertical, nor does it reference other layout-related tools like 'cocos_add_layout'. No prerequisites, exclusions, or contextual usage instructions are provided.

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