Skip to main content
Glama

cocos_drag_preview

Simulate mouse drag interactions in Cocos Creator to test UI elements like sliders or draggable cards by specifying start and end coordinates with adjustable motion steps.

Instructions

Drag the mouse from (from_x, from_y) to (to_x, to_y).

steps is the number of intermediate move events — bump it if Cocos isn't picking up the drag (some handlers need minimum motion per frame). 5 is enough for a typical slider or card move.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
from_xYes
from_yYes
to_xYes
to_yYes
stepsNo
buttonNoleft
wait_msNo
viewport_widthNo
viewport_heightNo
timeout_msNo
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 'steps' helps if Cocos isn't picking up the drag, which adds some behavioral context. However, it doesn't disclose critical traits like whether this tool simulates a drag in a preview environment, potential side effects (e.g., UI state changes), error conditions, or response behavior, leaving significant 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 concise and well-structured: the first sentence states the core action, and the second provides specific guidance on a key parameter. Every sentence adds value without redundancy, making it easy to parse and front-loaded with essential information.

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

Completeness2/5

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

Given the complexity (11 parameters, no annotations, no output schema), the description is incomplete. It only addresses one parameter ('steps') in depth and lacks information on the tool's overall behavior, return values, error handling, and most parameter meanings. This is inadequate for a tool with many parameters and no structured support.

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 explains 'steps' in detail, including its purpose (intermediate move events), troubleshooting advice, and a typical value (5). However, it doesn't cover other parameters like 'url', 'button', 'wait_ms', etc., leaving 10 out of 11 parameters without semantic clarification beyond their titles.

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 action ('Drag the mouse') and specifies the coordinates, making the purpose evident. However, it doesn't explicitly differentiate this tool from sibling tools like 'cocos_click_preview' or 'cocos_move_node', which might involve similar UI interactions in the Cocos context.

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 for dragging in UI elements like sliders or cards, and suggests adjusting 'steps' if Cocos doesn't pick up the drag. However, it lacks explicit guidance on when to use this tool versus alternatives (e.g., other interaction tools in the sibling list) or any 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