Skip to main content
Glama

cocos_validate_scene

Validate scene file structure to detect reference errors and linkage issues before building, ensuring compatibility and preventing runtime problems.

Instructions

Sanity-check a scene file: ref ranges, type tags, parent linkage.

Returns {valid: bool, object_count: int, issues: [...]}. Run this after building a scene to catch dangling id references before invoking cocos_build.

NOTE: structural-only. To check whether the scene's components match the project's enabled engine modules (the "build succeeds but RigidBody2D doesn't work" class of bugs), also call cocos_audit_scene_modules.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scene_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. It effectively discloses behavioral traits: it's a read-only validation tool (implied by 'sanity-check'), returns structured output ({valid: bool, object_count: int, issues: [...]}), and has specific limitations ('structural-only'). However, it doesn't mention error handling or performance aspects like timeouts.

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, followed by output details and usage guidelines. Every sentence earns its place by adding critical information without redundancy, making it highly efficient and well-structured.

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 the tool's complexity (validation with output details), no annotations, and no output schema, the description does a good job covering purpose, usage, and output structure. However, it lacks details on error cases or input parameter specifics, leaving minor gaps for full contextual understanding.

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?

The schema description coverage is 0%, so the description must compensate. It doesn't explicitly mention the 'scene_path' parameter, but the context ('a scene file') and usage note imply it takes a scene path. This adds some meaning beyond the bare schema, though not detailed syntax or format.

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 verb ('sanity-check') and resource ('a scene file'), with explicit details on what it checks ('ref ranges, type tags, parent linkage'). It distinguishes from sibling tools by contrasting with 'cocos_audit_scene_modules' for a different type of validation.

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?

It provides explicit guidance on when to use ('Run this after building a scene to catch dangling __id__ references before invoking `cocos_build`') and when not to use ('structural-only'), with a clear alternative named ('cocos_audit_scene_modules') for different checks.

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