Skip to main content
Glama
lightblink

Cocos Creator Local MCP

by lightblink

Assign SpriteFrame

cocos_local_assign_sprite_frame

Resolves a Cocos asset path or SpriteFrame UUID and assigns it to an existing node's Sprite.spriteFrame property, enabling dynamic sprite frame updates in a scene.

Instructions

Resolve a Cocos asset path or SpriteFrame UUID and assign it to an existing node's Sprite.spriteFrame property.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNo
nodePathYesExisting scene node path, e.g. Scene/Canvas/GameRoot/Player.
assetPathYesSprite asset reference: db://assets/..., assets/..., absolute project path, or a SpriteFrame UUID.
openSceneNo
saveSceneNo
scenePathNoassets/scenes/Main.scene
timeoutMsNo
projectRootYes
addSpriteComponentNo
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 discloses the basic action but omits important behavioral traits such as side effects (e.g., the saveScene parameter defaults to true, implying scene file modification), error behavior, or prerequisites like requiring an open editor. The default addSpriteComponent=true is not mentioned, which could lead to unexpected node modifications.

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 a single sentence that is concise and front-loaded with the main action. However, it sacrifices detail for brevity; it could include a bit more context without becoming verbose. Still, it is well-structured and easy to read.

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 tool's complexity (9 parameters, 3 required, no output schema, no annotations), the description is insufficient. It does not explain return values, error states, prerequisites (e.g., editor running, project loaded), or the behavior of key parameters like addSpriteComponent or saveScene. The description leaves significant gaps for an agent to understand the full context.

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?

Schema description coverage is only 22%. The description does not elaborate on any of the 9 parameters beyond the brief schema descriptions. For example, it doesn't explain the meanings of port, openScene, saveScene, scenePath, timeoutMs, projectRoot, or addSpriteComponent. With low coverage, the description should compensate but fails to provide meaningful additional context.

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 it resolves an asset path or UUID and assigns to an existing node's Sprite.spriteFrame property. It is specific about the verb (resolve and assign) and resource (Sprite.spriteFrame), and it distinguishes from sibling tools like cocos_local_create_sprite_node which creates a new node.

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 the tool is for existing nodes ('assign it to an existing node') but does not provide explicit guidance on when to use it versus alternatives, nor does it mention when not to use it. No exclusions or alternative suggestions are given.

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/lightblink/cocos-creator-local-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server