Skip to main content
Glama

cocos_get_ui_tokens

Retrieve the active UI theme for a Cocos Creator project, returning fully resolved theme tokens including fallback defaults when no theme is set.

Instructions

Return the project's active UI theme (fully resolved).

Always returns a complete theme — un-themed projects get the dark_game default with source='fallback'. Source is 'registry' when the project has explicitly pinned a theme.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_pathYes
Behavior4/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 effectively discloses key behavioral traits: it's a read-only operation (implied by 'return'), always returns a complete theme, handles fallback scenarios ('un-themed projects get the dark_game default'), and explains the 'source' field values ('registry' vs 'fallback'). This covers most essential aspects for a retrieval tool, though it lacks details on error handling or performance.

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 and well-structured: two short sentences that front-load the core purpose and follow with essential behavioral details. Every sentence adds value without any wasted words, making it easy for an AI agent to parse quickly.

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 tool's moderate complexity (retrieval with fallback logic), no annotations, no output schema, and 0% schema description coverage, the description is adequate but has gaps. It explains what's returned and fallback behavior but doesn't describe the output format, error conditions, or the single parameter. This meets minimum viability but isn't fully comprehensive.

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. The description doesn't mention the 'project_path' parameter at all, so it adds no semantic meaning beyond what the schema provides. However, since there's only one parameter and its purpose is somewhat inferable from context, this meets the baseline for minimal viability.

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: 'Return the project's active UI theme (fully resolved).' It specifies the verb ('return'), resource ('UI theme'), and scope ('fully resolved'). However, it doesn't explicitly differentiate from sibling tools like 'cocos_set_ui_theme' or 'cocos_list_builtin_themes', which would be needed for a score of 5.

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 implies usage context by stating 'Always returns a complete theme' and explaining fallback behavior for un-themed projects, but it doesn't provide explicit guidance on when to use this tool versus alternatives like 'cocos_set_ui_theme' or 'cocos_list_builtin_themes'. The guidelines are implied rather than clearly stated.

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