Skip to main content
Glama

resolve_size

Convert design px values into cia's 4px grid steps and return the matching SCSS function, rem equivalent, and guidance for expressing dimensions in cia code.

Instructions

Snap a design px value to cia's 4px geometric grid. Returns the step number, the SCSS call to emit (cia.grid(n) when exactly on grid; cia.px(value) when off-grid), the equivalent rem, and a human-readable note. AI agents: call this whenever you get a px value from a design tool (Figma, mockup, screenshot) and need to express it in cia code. NEVER write raw rem/px literals when a cia function applies. See /docs/composition for the full decision tree.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pxYesThe px value from the design (e.g. 24 for a 24px button height).
baseNoGrid base in px (default 4, matching cia's 4px grid).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does so well: it discloses the branching behavior (cia.grid(n) when exactly on grid, cia.px(value) when off-grid) and the shape of the response. It stops short of noting any failure modes or whether px must be positive, but for a pure computation tool this is nearly complete.

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?

Front-loaded with purpose, then return values, then agent-specific instructions — every sentence earns its place and the agent directive is valuable routing. It is slightly long for a two-parameter tool, but nothing is padding.

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?

There is no output schema, so the description must explain the return payload, and it does so fully (step number, SCSS call, rem, note). Combined with usage guidance and the docs pointer, an agent has everything needed to call and interpret it.

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% and both parameters are already documented in the schema, including the 'default 4' for base. The description reinforces the 4px grid context but adds no new syntax or format detail beyond what the schema states, so the baseline 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?

The description opens with a specific verb+resource ('Snap a design px value to cia's 4px geometric grid') and then enumerates exactly what is returned (step number, SCSS call, rem, note). This is plainly distinguishable from the read/search siblings, none of which perform grid snapping.

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?

It gives an explicit trigger ('call this whenever you get a px value from a design tool (Figma, mockup, screenshot)') plus a hard exclusion ('NEVER write raw rem/px literals when a cia function applies') and points to the decision tree at /docs/composition. No inference is required.

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