Skip to main content
Glama

cocos_lint_ui

Check UI components in Cocos Creator scenes for accessibility and usability issues like small touch targets, text clipping, or rendering problems to improve user experience.

Instructions

Non-structural UI quality check (complement to cocos_validate_scene).

Flags issues that build + load cleanly but produce bad UX:

  • Button touch target below 44×44 (iOS HIG / Material 48dp min)

  • Label overflow=NONE + wrap off in a box that likely clips the text

  • UI component on a node with layer != UI_2D (UICamera won't render it)

Returns {ok, scene_path, warnings:[{rule, node_id, node_name, message}]}. All warnings are non-fatal; the caller decides what to fix.

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 full burden and does well. It discloses the tool is non-destructive (returns warnings, not errors), specifies the exact return format {ok, scene_path, warnings:[...]}, and explains that warnings are 'non-fatal' with the caller deciding fixes. It doesn't mention performance characteristics or rate limits, but covers core behavioral aspects adequately.

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 efficiently structured: first sentence establishes purpose, bullet points provide concrete examples, final sentences explain return format and warning nature. Every sentence adds value with zero wasted words, and key information is front-loaded.

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?

For a tool with no annotations, no output schema, and 0% schema coverage, the description does remarkably well. It explains purpose, usage, behavior, and return format. The only minor gap is not explicitly mentioning the single input parameter, but the return format implies it. Given the complexity (UX linting tool), this is nearly complete.

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% with 1 parameter, so the description must compensate. While it doesn't explicitly mention the 'scene_path' parameter, the return format includes 'scene_path' and the context implies it analyzes a scene. The description provides rich semantic context about what the tool checks (touch targets, label overflow, UI layer), which helps understand what the parameter represents beyond just a path string.

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 tool performs a 'Non-structural UI quality check' and specifies it's a 'complement to cocos_validate_scene.' It explicitly distinguishes itself from siblings by focusing on UX issues that build cleanly but produce bad user experience, unlike the many 'add_' and 'create_' sibling tools.

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: 'Flags issues that build + load cleanly but produce bad UX' and positions it as 'complement to cocos_validate_scene.' It gives three concrete examples of when to use it (small touch targets, label overflow, wrong UI layer) and states 'All warnings are non-fatal; the caller decides what to fix,' clarifying its advisory role.

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