Skip to main content
Glama

Spacing scale

spacing_scale
Read-only

Generates a spacing scale in px and rem using linear (Tailwind-style base multipliers) or geometric steps, so you can define consistent design tokens for UI layout and CSS.

Instructions

Builds a spacing scale in px and rem: linear (Tailwind multipliers of a base unit) or geometric (each step multiplied by a ratio).

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": "spacing_scale"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNoBase unit in px
kindNolinear
ratioNoGeometric only

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.3.1

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered and the description only needs to add context. It does add that the output is expressed in both px and rem and that generation is deterministic arithmetic, but it never says how many steps are produced or what happens when ratio is supplied with kind=linear.

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?

A single front-loaded sentence that states what is built, in what units, and the two modes. Nothing is padded or repeated from the schema.

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 carries the burden of describing the return value; it names the units but not the shape (array vs object), the number of steps, or the default scale length. Acceptable for a zero-required-parameter computation tool, but an agent still cannot predict what it will receive.

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?

Beyond the schema's 67% coverage, the description explains what the enum values actually mean: linear uses Tailwind multipliers of the base unit, geometric multiplies each step by a ratio. That gives real semantic content for kind and ratio that the bare enum and 'Geometric only' note do not convey.

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?

States a specific verb and resource ('Builds a spacing scale') plus the output units (px and rem), and names the two generation modes. It does not explicitly contrast itself with a sibling like type_scale, but the resource is unambiguous enough that an agent can tell what it produces.

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 at the tool level: nothing says when to reach for this versus other scale or token tools, nor what to do with the result (e.g., hand off to export_tokens). The only selection help is which mode to pick, which is parameter-level rather than tool-level guidance.

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