Skip to main content
Glama

cocos_add_fade_in

Adds a fade-in animation to Cocos Creator scene nodes, creating opacity transitions from transparent to opaque at startup with configurable duration and delay.

Instructions

Fade a node from transparent → opaque at scene start.

Generates a .anim clip in assets/animations/ (override with rel_dir), attaches cc.UIOpacity (initial 0 so the first frame doesn't flash), and attaches cc.Animation with play_on_load=True. delay holds at 0 opacity before the ramp — useful for staggering sibling fades.

Returns {clip_uuid, clip_path, anim_component_id, opacity_component_id}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
durationNo
delayNo
rel_dirNo
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behavioral traits: it generates a '.anim' clip in a default directory (with override option), attaches specific components ('cc.UIOpacity' and 'cc.Animation'), sets initial opacity to 0 to prevent flashing, and enables play_on_load. It also explains the effect of the 'delay' parameter. However, it does not cover error handling, permissions, or side effects like file overwrites, leaving some gaps.

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: the first sentence states the core purpose, followed by implementation details and a return value summary. Every sentence adds value—explaining file generation, component attachment, parameter effects, and outputs—with zero waste. It is structured for quick comprehension.

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

Completeness4/5

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

Given the tool's complexity (5 parameters, no annotations, no output schema), the description is largely complete. It explains what the tool does, how it behaves, parameter roles, and return values. However, it lacks explicit error cases, prerequisites (e.g., node existence), or output schema details, which could be helpful for an agent. The return value description is provided, mitigating the absence of an output schema.

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

Parameters5/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 significant meaning: 'rel_dir' overrides the default 'assets/animations/' directory, 'delay' holds at 0 opacity before the ramp for staggering fades, and the tool implicitly uses 'scene_path' and 'node_id' to target a node. It also mentions 'duration' as part of the fade ramp. This clarifies all 5 parameters beyond their schema titles, fully compensating for the lack of schema descriptions.

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

Purpose5/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: 'Fade a node from transparent → opaque at scene start.' It specifies the verb ('Fade'), resource ('a node'), and scope ('at scene start'), distinguishing it from siblings like 'cocos_add_scale_in' or 'cocos_add_slide_in' by focusing on opacity animation. This is specific and actionable.

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

Usage Guidelines4/5

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

The description provides clear context for usage: 'at scene start' and 'useful for staggering sibling fades.' It implies when to use it (for fade-in effects) but does not explicitly state when not to use it or name alternatives among the many sibling tools. The guidance is helpful but not exhaustive regarding alternatives.

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