Skip to main content
Glama

cocos_add_shake

Add screen shake effects to game objects for visual feedback on impacts, damage, or errors. Configure intensity, duration, and axis direction to simulate different types of interactions.

Instructions

One-shot position wobble — for damage / error / impact feedback.

axis: "x" (horizontal hit / invalid-input), "y" (stomp), "both" (explosion / big impact). intensity is the peak amplitude in logical pixels; oscillation decays linearly to 0 over duration.

Animates around the node's CURRENT _lpos — position the node first, then attach.

Returns {clip_uuid, clip_path, anim_component_id}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
intensityNo
durationNo
axisNox
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 effectively discloses key behavioral traits: it's a one-shot animation (not continuous), oscillates around current position, decays linearly, and returns animation identifiers. It clarifies that it animates 'around the node's CURRENT _lpos', which is crucial for understanding its effect. No contradictions exist.

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 highly concise and well-structured: it opens with the core purpose, details parameters with examples, adds a critical usage note, and ends with return values. Every sentence adds essential information without redundancy, making it easy to parse.

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 6 parameters with 0% schema coverage and no output schema, the description does an excellent job explaining most parameters and the tool's behavior. However, it does not cover 'rel_dir' or potential errors, and the return values are listed without explanation. For a mutation tool with no annotations, it's very complete but has minor gaps.

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 fully. It provides detailed semantics for 'axis' (mapping values to specific feedback types), 'intensity' (peak amplitude in logical pixels), and 'duration' (linear decay time). It also implies 'scene_path' and 'node_id' target a node, though 'rel_dir' is not explained. This adds significant value beyond the bare schema.

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 as a 'one-shot position wobble' for 'damage / error / impact feedback', specifying the action (add shake), resource (node position), and context (feedback animation). It distinguishes from siblings like 'cocos_add_bounce_in' or 'cocos_add_pulse' by focusing on oscillation decay for impact effects.

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 when to use it ('for damage / error / impact feedback') and includes a procedural note ('position the node first, then attach'), which guides proper sequencing. However, it does not explicitly mention when not to use it or name alternative tools for similar effects.

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