Skip to main content
Glama

cocos_upgrade_image_meta

Convert PNG texture metadata to sprite-frame format for Cocos Creator, enabling image use in Sprite components without manual editing.

Instructions

Upgrade a texture-only PNG meta to include a sprite-frame sub.

Cocos Creator's CLI --build auto-generates type: texture metas when it imports a fresh PNG. To reference such a PNG from cc.Sprite, run this tool to add the f9941 (sprite-frame) sub. Idempotent — does nothing if the sub already exists.

Returns the updated meta dict.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
meta_pathYes
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 of behavioral disclosure. It effectively describes key traits: it's idempotent ('does nothing if the sub already exists'), it modifies metadata ('add the f9941 (sprite-frame) sub'), and it returns a value ('Returns the updated meta dict'). However, it doesn't mention potential errors (e.g., invalid paths) or side effects, leaving some behavioral aspects uncovered.

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 front-loaded with the core purpose in the first sentence, followed by context, behavioral note, and return value in three concise sentences. Each sentence adds essential information without redundancy, making it efficient and well-structured for quick understanding.

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 1 parameter, no annotations, and no output schema, the description provides good context: purpose, usage, idempotency, and return value. It covers the tool's role in the Cocos workflow but lacks details on parameter semantics and error handling. For a simple mutation tool, this is mostly complete but could be enhanced with more parameter guidance.

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

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, so the description must compensate. It implies 'meta_path' refers to the path of a PNG meta file needing upgrade, but doesn't specify format (e.g., relative/absolute path) or constraints. This adds minimal semantic value beyond the schema's title 'Meta Path', meeting the baseline for low coverage without fully compensating.

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 ('Upgrade a texture-only PNG meta'), the resource ('PNG meta'), and distinguishes it from siblings by explaining it adds a 'sprite-frame sub' for use with 'cc.Sprite', unlike other tools that add components or manage scenes. It explicitly mentions the context of Cocos Creator's CLI auto-generation, making the purpose distinct and well-defined.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool: when Cocos Creator's CLI generates a 'type: texture' meta for a fresh PNG and you need to reference it from 'cc.Sprite'. It also states when not to use it: if the sub already exists, as the tool is idempotent. This clearly differentiates it from sibling tools that handle other asset types or operations.

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