Skip to main content
Glama
nmassi

glyphs-mcp

by nmassi

analyze_spacing

Check spacing quality across all masters by measuring sidebearings and white space, then flag inconsistencies against type design standards.

Instructions

Analyze spacing quality across all masters.

RECIPE: For systematic spacing work, call get_recipe("spacing_workflow") first — it follows Cheng/Briem/Ruder methodology step by step.

Measures sidebearings and white space margins using scanline ray-casting, then checks for consistency issues:

  • Sidebearing group consistency (n-group: h,i,k,l,m,n,p,r should match; o-group: c,d,e,g,o,q)

  • Tracy/Smith per-glyph sidebearing rules (from "Designing Type" by Karen Cheng)

  • Side-type ordering (straight SB > round SB > diagonal SB)

  • Symmetric glyph check (o, O, H, I should have LSB ≈ RSB)

  • Reference ratios (n LSB / o LSB — optimal ~1.5x, acceptable 1.2–2.0)

  • Counter-based validation (n LSB should be 25–50% of n counter width)

  • Word space check (space width ≈ ¼ em ≈ width of i)

  • Cross-master spacing drift (spacing ratios should be maintained)

Does not modify glyph colors by default. When mark_glyphs=True, marks significant inconsistencies red, minor deviations yellow, and passes green.

Args: master_id: Optional master ID (empty = all masters) glyph_names: Optional list of glyphs (empty = all Letter glyphs) mark_glyphs: Color glyphs by verdict only when explicitly requested

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
master_idNo
glyph_namesNo
mark_glyphsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so well. It explicitly states 'Does not modify glyph colors by default' and explains the conditional mark_glyphs behavior with color verdicts. It also discloses the algorithm's scope (scanline ray-casting, consistency checks) and the naming convention for exceptions, making side effects and behavior clear.

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 well-structured: a concise opener, a recipe pointer, a coherent bulleted list of checks, and a side-effect note before Args. It is front-loaded and scannable, but the mark_glyphs behavior is somewhat redundantly stated both in the prose and in the Args section, costing full efficiency.

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?

For a complex analysis tool with no annotations and zero schema coverage, the description is remarkably complete. It covers the recipe prerequisite, measurement methodology, all parameter meanings, and the conditional side effect of color marking. Since an output schema exists, return-value documentation is not required here.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does. Each parameter is explained: master_id defaults to all masters when empty, glyph_names defaults to all Letter glyphs, and mark_glyphs is described as applying verdict colors only when explicitly requested. This adds meaningful semantics beyond the raw schema.

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 and resource: 'Analyze spacing quality across all masters.' It then enumerates concrete checks (sidebearing group consistency, Tracy/Smith rules, counter-based validation, cross-master drift) that clearly distinguish it from sibling tools like analyze_kerning or measure_stems. The scope and method are unambiguous.

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

Usage Guidelines4/5

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

The 'RECIPE' section explicitly recommends calling get_recipe("spacing_workflow") first for systematic spacing work, giving clear context for when this tool fits into a workflow. However, it does not state when not to use it or compare it directly with sibling analysis tools such as analyze_kerning, so it falls short of full guidance.

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