Skip to main content
Glama

Spacing audit

audit_spacing
Read-only

Audit spacing in a stylesheet. Pass css (free) or a public url (Pro). Reads margin, padding and gap properties (shorthands split into their parts; rem and em converted with the root size the CSS sets; auto and 0 skipped), then reports the detected base unit (8 if 85% of uses fit, else 4, else none with the best fit), the number of distinct values against a budget of 12, off-grid values with counts, gaps between steps, values used once, the split between margin, padding and gap, and a proposed scale with an old-to-new table. Percent, vw, calc() and clamp() values are counted as fluid and left out of the scale.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "audit_spacing"
  }
}

Input Schema

NameRequiredDescriptionDefault
cssNoCSS text to read (a stylesheet, or several concatenated). Free up to 100,000 characters; Pro up to 2,000,000.
urlNoPro only. Public page whose linked and inline stylesheets are fetched (up to 12 sheets, 5 MB).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.2/5.0
Behavior5/5

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

Annotations already declare it read-only and open-world, but the description adds substantial context beyond them: input size ceilings (100,000 chars free / 2,000,000 Pro), the 12-sheet and 5 MB fetch cap, the 85% fit rule for detecting a base unit, shorthand splitting, rem/em conversion against the document root size, and skipping of auto/0. It also discloses that percent, vw, calc() and clamp() are counted as fluid and excluded from the scale, which materially affects how an agent should interpret 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?

The purpose is front-loaded in the first sentence and every subsequent clause carries information, but the report contents are packed into a single very long sentence that is dense to parse. Slight restructuring into a short list of reported items would improve scanability without losing content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 carries the return-value burden and does so thoroughly, enumerating the base unit detection, distinct-value count against a budget of 12, off-grid values with counts, gaps, singletons, the margin/padding/gap split, and the proposed old-to-new scale table. An agent can predict the response shape and decide whether this tool answers its question.

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 both parameters are already fully documented in the schema, including their size limits. The description restates the free-vs-Pro split and adds no syntax or format detail beyond that, so the baseline of 3 applies.

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 ('Audit spacing in a stylesheet') and immediately scopes it to reading existing CSS rather than generating a scale, which cleanly separates it from siblings like build_spacing_scale and audit_token_scales. The agent knows exactly what is being inspected and what kind of answer comes back.

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?

It gives useful input-selection guidance — use `css` on the free tier or a public `url` on Pro — which tells the agent which parameter path to take. However, it never states when to reach for this tool versus audit_token_scales, vertical_rhythm, or build_spacing_scale, so the alternative-selection guidance 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.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources