Skip to main content
Glama
nmassi

glyphs-mcp

by nmassi

analyze_kerning_groups

Determines and assigns professional kerning groups for every glyph, using dictionary lookup, component inheritance, and contour analysis to replace missing or wrong groups.

Instructions

Analyze and assign kerning groups to all glyphs.

RECIPE: For a complete kerning workflow (groups → pairs → verification), call get_recipe("kerning_from_scratch") first.

Assigns correct groups to all glyphs, overwriting any existing values. Uses a five-tier resolution strategy:

  1. Dictionary lookup for ~80 base glyphs (A-Z, a-z, figures, punctuation)

  2. Dot-suffix stripping (a.ss01 → a)

  3. Component inheritance for accented/composite glyphs (Aacute → A)

  4. Unicode decomposition fallback

  5. Contour analysis fallback (ray-casting edge detection)

Group names follow professional conventions (key glyph = group name):

  • UC left: H (straight stem), O (round), A (diagonal), V, T, S, etc.

  • UC right: H (straight), O (round), D (half-round), E (horizontal), etc.

  • LC left: h (straight), o (round), v (diagonal), f, etc.

  • LC right: h (straight), n (arch), o (round), etc.

  • Figures: each gets its own group (shapes too varied)

Does not modify glyph colors by default. Set mark_glyphs=True only when the user explicitly asks to mark applied or proposed group changes.

Args: glyph_names: Optional list of glyph names (default: all Letter/Number/Punctuation glyphs) apply: If True (default), assign groups. If False, dry run only. overwrite: If True (default), overwrite existing groups. If False, only assign to empty slots. mark_glyphs: Color affected glyphs only when explicitly requested.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
applyNo
overwriteNo
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.3/5.0
Behavior5/5

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

With no annotations to rely on, the description carries the full burden and succeeds: it discloses destructive behavior ('overwriting any existing values'), the five-tier resolution strategy, group-naming conventions, and the fact that glyph colors are not modified by default. These are exactly the behavioral traits an agent needs before invoking the tool.

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 longer than average, but it is organized into clear sections (recipe, strategy, naming, args) and most sentences carry decision-relevant information. The front-loaded purpose and the strategy list are appropriate; only the detailed group-name examples add slight optionality rather than necessity.

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?

Given the tool's complexity and zero annotation coverage, the description covers purpose, side effects, algorithm, parameter semantics, and usage conditions. An output schema exists, so not detailing return values is acceptable; nothing essential for selecting or calling this tool is missing.

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 fully compensate. It does: each of the four parameters is explained with its default and effect, including the dry-run behavior of apply, the empty-slot-only behavior of overwrite, and the explicit-request condition for mark_glyphs.

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 opens with a specific verb and resource: 'Analyze and assign kerning groups to all glyphs.' It clearly states the tool's scope (all glyphs) and names its core behavior, but it does not explicitly differentiate itself from sibling tools such as analyze_kerning or auto_kern.

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?

The description gives helpful context (recipe first, mark_glyphs only on explicit request, apply as dry run), but it does not state when to choose this tool over alternatives like analyze_kerning or auto_kern, nor does it mention exclusions.

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