Skip to main content
Glama

cocos_add_mesh_renderer

Attach a 3D mesh renderer to nodes in Cocos Creator scenes to display meshes with materials, shadows, and reflection settings.

Instructions

Attach cc.MeshRenderer — renders a 3D mesh.

material_uuids: one per submesh; order matters. Pass None to wire later via cocos_set_uuid_property(id, "_mesh", uuid). shadow_casting: 0=OFF (default), 1=ON. shadow_receiving: 0=OFF, 1=ON (default). reflection_probe_type: 0=NONE, 1=BAKED_CUBEMAP, 2=PLANAR, 3=BLEND.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
node_idYes
mesh_uuidNo
material_uuidsNo
shadow_castingNo
shadow_receivingNo
reflection_probe_typeNo
enable_morphNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
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 implies a mutation ('Attach'), suggesting this modifies a scene node, but doesn't disclose behavioral traits like whether it requires specific permissions, if it's idempotent, what happens on failure, or the output format. The mention of default values for shadow_casting and shadow_receiving adds some context, but overall behavioral disclosure is minimal.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by parameter details. There's minimal waste, though the parameter explanations could be slightly more structured (e.g., bullet points). Every sentence adds value, making it efficient for an agent to parse.

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?

Given 8 parameters with 0% schema coverage and no annotations, the description partially compensates by detailing 4 parameters. An output schema exists, so return values needn't be explained. However, as a mutation tool with many parameters, the description should ideally cover all parameters or at least the required ones (scene_path, node_id), and provide more behavioral context. It's minimally adequate but has clear gaps.

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 provides meaningful semantics for 4 parameters (material_uuids, shadow_casting, shadow_receiving, reflection_probe_type), explaining their purposes, formats, and default values. However, it omits details for the other 4 parameters (scene_path, node_id, mesh_uuid, enable_morph), leaving them undocumented. The value added for the covered parameters is significant, but incomplete coverage prevents a perfect score.

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 tool's purpose: 'Attach cc.MeshRenderer — renders a 3D mesh.' It specifies the verb ('attach'), resource ('cc.MeshRenderer'), and outcome ('renders a 3D mesh'). However, it doesn't explicitly differentiate from sibling tools like 'cocos_add_skinned_mesh_renderer', which appears to serve a similar purpose for skinned meshes.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. It mentions a workaround for material_uuids ('Pass None to wire later via cocos_set_uuid_property'), but doesn't explain when to choose this tool over other rendering or component-adding tools in the sibling list. No prerequisites, exclusions, or contextual usage hints 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/chenShengBiao/cocos-mcp'

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