Skip to main content
Glama

cocos_create_animation_clip

Create animation clips for Cocos Creator projects by defining keyframes for properties like position, scale, rotation, opacity, color, and active state.

Instructions

Create a .anim AnimationClip file.

Each track dict: {path, property, keyframes: [{time, value}, ...]}. Properties: 'position' (value=[x,y,z]), 'scale' ([sx,sy,sz]), 'rotation' ([ez]), 'opacity' (0-255), 'color' ([r,g,b,a]), 'active' (bool).

Returns {path, rel_path, uuid}. Use uuid with cocos_add_animation().

Example track: {"path": "", "property": "position", "keyframes": [{"time": 0, "value": [0,0,0]}, {"time": 1, "value": [100,0,0]}]}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
clip_nameYes
durationNo
sampleNo
tracksNo
rel_dirNo
Behavior3/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 describes the creation of a file and the return format, which is useful. However, it lacks details on permissions, error handling, whether the operation is idempotent, or what happens if the file already exists. The description adds some behavioral context but is incomplete for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the core purpose, followed by essential details and an example. It's appropriately sized, but the example track could be slightly more concise. Overall, most sentences earn their place by adding critical information.

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 complexity (6 parameters, 0% schema coverage, no output schema, no annotations), the description does well by explaining the tracks parameter thoroughly and the return values. However, it doesn't cover other parameters like 'project_path' or 'duration', leaving some gaps in context for a tool with multiple inputs.

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 provides detailed semantics for the 'tracks' parameter, including structure, property types, and value formats, with an example. This adds significant meaning beyond the bare schema, effectively documenting the most complex parameter.

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 specific action ('Create a .anim AnimationClip file') and resource type, distinguishing it from sibling tools that handle scripts, audio, components, etc. It provides concrete details about the output format and structure, making the purpose unambiguous.

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 by explaining the return values and how to use the uuid with 'cocos_add_animation()', which implies a workflow. However, it doesn't explicitly state when to use this tool versus alternatives like 'cocos_create_node' or other creation tools, nor does it mention prerequisites or exclusions.

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