Skip to main content
Glama

analyze_design_scatter

Read-onlyIdempotent

Analyzes scattered hardcoded design tokens (colors, dimensions, strings) across a project and returns a categorized report to prevent context window exhaustion.

Instructions

Analyzes scattered hardcoded design tokens (colors, dimensions, strings) across the project.
Returns a compact, categorized report to avoid context window exhaustion.

When to use:
- Call during project onboarding, architecture audits, or before major UI refactorings.
- Call to locate hardcoded color literals, raw Dp values, and string literals across Jetpack Compose files.

When NOT to use:
- Do not use if you already know the exact token name or file (use find_token_by_color or list_tokens instead).
- Do not use for applying code changes directly (use set_token, add_token, or set_text instead).

Side effects:
- None (strictly read-only AST inspection, does not modify any source code or configuration).

Args:
    category: 'all', 'colors', 'dimensions', or 'strings'.
    limit: Maximum number of files to return per category (default: 10).
    project_root: Optional path to project root.

Input Schema

NameRequiredDescriptionDefault
limitNo
categoryNoall
project_rootNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The 'Side effects: None (strictly read-only AST inspection)' line largely restates readOnlyHint=true, destructiveHint=false, and idempotentHint=true, which the annotations already establish. The genuinely additive behavioral detail is that it returns a compact, categorized report specifically to avoid context-window exhaustion, which tells the agent the output is deliberately abbreviated. That one useful disclosure, plus the AST-implementation note, keeps it above the floor rather than at it.

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 front-loaded with the one-line purpose, then cleanly sectioned into When to use / When NOT to use / Side effects / Args, so an agent can scan to the relevant block. It is slightly longer than necessary because the 'Side effects: None' block duplicates annotation data and the Args block overlaps the schema defaults.

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 read-only analysis tool with an output schema, everything needed to invoke it correctly is present: selection guidance, exclusions, safety profile, and the meaning of all three parameters. The only gap is a definition of what makes a token 'scattered' or how results are thresholded, which would help an agent interpret the report.

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 carries the burden and does so for all three params: it enumerates the category values ('all', 'colors', 'dimensions', 'strings') that the schema only types as an unconstrained string, clarifies that limit is files returned per category (not total), and marks project_root as optional. It does not explain what the 'all' category aggregates vs. individual categories, which is the one remaining ambiguity.

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?

States a specific verb and resource: 'Analyzes scattered hardcoded design tokens (colors, dimensions, strings) across the project.' The parenthetical names exactly what kinds of literals are in scope, and later lines distinguish it from find_token_by_color, list_tokens, and set_text, so an agent can pick it over siblings without opening a schema.

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?

Explicit when-to-use triggers are given (project onboarding, architecture audits, before major UI refactorings) and explicit when-NOT-to-use cases name the correct alternatives: find_token_by_color or list_tokens when the exact token/file is known, and set_token/add_token/set_text for applying changes. Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.