Skip to main content
Glama

cocos_set_property

Set literal properties like text, color, or size on Cocos Creator scene objects programmatically without manual editing.

Instructions

Set a literal (non-reference) property on any scene object.

Use this for things like _string, _fontSize, _color, etc. For node/component references, use cocos_link_property instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
object_idYes
prop_nameYes
valueYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It indicates this is a mutation operation ('Set'), but doesn't disclose behavioral aspects like permissions needed, whether changes are reversible, error conditions, or rate limits. The description adds some context about property types but lacks comprehensive behavioral disclosure.

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 extremely concise with only two sentences, both of which add clear value. The first sentence states the core purpose, and the second provides specific usage guidance with sibling differentiation. No wasted words or redundant information.

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

Completeness3/5

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

For a mutation tool with 4 parameters (0% schema coverage) and no annotations, the description provides good purpose and usage guidance but lacks behavioral context and complete parameter semantics. The existence of an output schema helps, but the description should do more to compensate for the missing structured information about this write operation.

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?

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description mentions 'literal property' and gives examples of property names, which adds some semantic context for 'prop_name' and implies 'value' accepts various data types. However, it doesn't explain 'scene_path' or 'object_id' parameters, leaving significant gaps in parameter understanding.

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 verb ('Set') and resource ('literal property on any scene object'), with specific examples (_string, _fontSize, _color). It explicitly distinguishes from its sibling tool 'cocos_link_property' by specifying this is for non-reference properties only.

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 ('for literal properties like _string, _fontSize, _color') and when to use an alternative ('For node/component references, use cocos_link_property instead'). This gives clear context for tool selection among siblings.

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