Skip to main content
Glama

cocos_set_shadows

Configure planar shadows in Cocos Creator scenes by setting ground plane normal, distance offset, and shadow color parameters to enhance visual depth.

Instructions

Configure planar shadows on the scene's cc.ShadowsInfo.

normal: ground plane normal, defaults to (0, 1, 0) for flat ground. distance: signed offset along normal from world origin. color: shadow color, ints 0..255.

Pass None on any axis/channel to leave it unchanged. Enabling planar shadows also typically requires at least one DirectionalLight in the scene.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_pathYes
enabledNo
normal_xNo
normal_yNo
normal_zNo
distanceNo
color_rNo
color_gNo
color_bNo
color_aNo
Behavior3/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 reveals that this is a configuration/mutation tool (implied by 'configure'), describes the default values for parameters, and mentions the DirectionalLight prerequisite. However, it doesn't cover important behavioral aspects like whether changes are reversible, what permissions are needed, error conditions, or what happens when shadows are disabled. For a 10-parameter mutation tool, this is a significant gap.

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 perfectly concise and well-structured. Four sentences cover purpose, parameter meanings, null behavior, and a prerequisite. Every sentence earns its place with essential information. No wasted words, and the most critical information (what the tool does) appears first.

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 the complexity (10 parameters, mutation tool) and lack of both annotations and output schema, the description is incomplete. While it excels at parameter semantics, it lacks crucial context: no information about return values, error handling, side effects, or what 'configure' actually does to the scene. For a tool that modifies scene state, this leaves significant gaps for an AI agent.

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

Parameters5/5

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

The schema description coverage is 0%, so the description must compensate fully. It does this excellently: it explains the meaning of normal (ground plane normal with default), distance (signed offset), and color (shadow color with integer range). It also clarifies the null behavior: 'Pass None on any axis/channel to leave it unchanged.' This adds crucial semantic context beyond the bare parameter names in the schema.

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: 'Configure planar shadows on the scene's cc.ShadowsInfo.' It specifies the verb ('configure') and resource ('planar shadows'), though it doesn't explicitly differentiate from sibling tools (none appear to be shadow-related). The description goes beyond the tool name by explaining what aspect of shadows is configured.

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 provides some implied usage guidance: 'Enabling planar shadows also typically requires at least one DirectionalLight in the scene.' This gives a prerequisite condition. However, it doesn't explicitly state when to use this tool versus alternatives (no shadow-related siblings exist) or provide exclusion criteria. The guidance is helpful but incomplete.

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