Skip to main content
Glama

cocos_add_ui_opacity

Add opacity control to UI elements in Cocos Creator for creating fade animations, with values from 0 (invisible) to 255 (opaque).

Instructions

Attach cc.UIOpacity (0=invisible, 255=opaque). Required for fade animations.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
opacityNo

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 the opacity range, but it does not cover critical behaviors like whether this is a mutation (likely yes, given 'Attach'), permission requirements, error handling, or side effects. 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 and front-loaded: two sentences that directly state the tool's function and usage context without any wasted words. Every sentence earns its place by providing essential information efficiently.

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 that there is an output schema (which reduces the need to describe return values) but no annotations and low parameter coverage, the description is minimally adequate. It covers the basic purpose and a key usage scenario but lacks details on behavior, parameters, and broader context, making it incomplete for effective tool selection.

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?

The input schema has 0% description coverage, and the description does not explain the parameters beyond implying 'opacity' is involved. It does not clarify what 'scene_path' or 'node_id' mean, their formats, or how they relate to the attachment process. With low schema coverage, the description fails to compensate, leaving parameters largely undocumented.

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.UIOpacity (0=invisible, 255=opaque).' It specifies the verb ('Attach'), resource ('cc.UIOpacity'), and the opacity scale. However, it does not explicitly differentiate from sibling tools like 'cocos_add_component' or other UI-related tools, which prevents a perfect score.

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 provides some usage context by stating 'Required for fade animations,' which implies when to use this tool. However, it does not specify when not to use it or mention alternatives, such as other UI opacity methods or sibling tools for similar effects, leaving the guidance incomplete.

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