Skip to main content
Glama

Analyze UI Layout

analyze_ui_layout
Read-onlyIdempotent

Inspect CSS and HTML to identify spacing, hierarchy, and accessibility issues in UI layouts, helping developers fix structural and usability problems before release.

Instructions

Analyze a UI layout description and report spacing, hierarchy and accessibility concerns.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "css": "<css>"
    },
    "name": "analyze_ui_layout"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssYesCSS source
htmlNoHTML source

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.1

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive and closed-world, so the safety profile is fully covered. The description adds that the output is a report of concerns in three named areas, which is useful context beyond annotations, but says nothing about how the analysis is performed, whether findings are heuristic, or how the optional HTML input changes results.

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?

A single efficient sentence with the verb and outcome front-loaded and no filler. It is concise to the point of being thin, but no sentence is wasted.

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?

With no output schema, the description must carry the return-value burden; naming three report categories partially does that, but the format, depth, and severity semantics of the report are unstated. The role of the optional html parameter is also left unexplained, which matters for a two-parameter analysis tool.

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?

Schema coverage is 100%, so the css and html parameters are already documented in the schema, giving a baseline of 3. The description refers vaguely to a "UI layout description" without ever naming CSS or HTML, so it adds no meaning and arguably obscures that raw source files are the inputs.

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 names a specific verb and resource ("Analyze a UI layout") and enumerates the three concern areas it reports on: spacing, hierarchy, and accessibility. It does not explicitly differentiate itself from siblings like analyze_code or html_css_to_javafx_css, which is the only thing keeping it from a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no statement about when HTML input should be supplied versus CSS alone, and no named alternative or exclusion. An agent must infer the invocation context entirely from the one sentence.

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