Skip to main content
Glama

cocos_add_scroll_bar

Attach a scroll bar indicator to a ScrollView component in Cocos Creator. Configure direction, auto-hide behavior, and link to handle sprites for UI navigation controls.

Instructions

Attach cc.ScrollBar — companion scroll indicator for a ScrollView.

direction: 0=HORIZONTAL (default), 1=VERTICAL. Pass scroll_view_id + handle_sprite_id to wire both references at attach time; otherwise set later via link_property.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
handle_sprite_idNo
scroll_view_idNo
directionNo
enable_auto_hideNo
auto_hide_timeNo

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. It mentions that the tool attaches a scroll bar and provides some behavioral details like parameter usage and the 'link_property' alternative. However, it lacks critical information such as whether this is a read-only or destructive operation, permission requirements, error handling, or rate limits. The description adds some context but is insufficient for a mutation 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 appropriately sized and front-loaded, with the first sentence stating the core purpose. Subsequent sentences efficiently explain key parameters and alternatives without unnecessary details. Every sentence adds value, making it concise and well-structured.

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 the complexity (7 parameters, no annotations, but has output schema), the description is partially complete. It explains the tool's purpose and some parameters but misses details on behavioral traits and several parameters. The presence of an output schema means return values are documented elsewhere, but for a tool with mutation implications and low schema coverage, the description should do more to guide usage and clarify behavior.

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

Parameters4/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 adds meaningful semantics for three parameters: 'direction' (with values 0=HORIZONTAL, 1=VERTICAL), 'scroll_view_id', and 'handle_sprite_id', explaining their purposes and usage. However, it does not cover the other four parameters ('scene_path', 'node_id', 'enable_auto_hide', 'auto_hide_time'), leaving gaps in understanding. The description provides valuable insights but is incomplete.

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: 'Attach cc.ScrollBar — companion scroll indicator for a ScrollView.' It specifies the verb ('Attach'), resource ('cc.ScrollBar'), and context ('companion scroll indicator for a ScrollView'). However, it does not explicitly differentiate from sibling tools like 'cocos_add_scroll_view', which might be related but serves a different function.

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 mentioning it's a 'companion scroll indicator for a ScrollView', suggesting it should be used with a ScrollView. It also hints at alternatives: 'Pass ``scroll_view_id`` + ``handle_sprite_id`` to wire both references at attach time; otherwise set later via link_property.' This indicates when to use certain parameters but does not explicitly state when to use this tool versus other UI or scroll-related tools in the sibling list.

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