Skip to main content
Glama

font-coverage

Font coverage: does this font have glyphs for this text, and does it fit the box — Reads a TrueType or OpenType font you supply as base64 (up to 2 MB) and a text of up to 5000 characters, for an agent about to render text in a fixed font: lists every code point with no glyph in the cmap (formats 4 and 12) and sums the hmtx advance widths to test a width in pixels. Every offset is bounds-checked. It does not apply kerning, ligatures or shaping (combining marks and complex scripts

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fontBase64": "<fontBase64>",
      "text": "<text>"
    },
    "name": "font-coverage"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYes
fontBase64YesBase64 of a .ttf or .otf file (sfnt, not WOFF).
fontSizePxNoNeeded for a width check.
maxWidthPxNoBox width; the widest line (split on \n) must fit.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses input limits (base64 font up to 2 MB, text up to 5000 chars), the exact table formats read (cmap 4 and 12, hmtx), that every offset is bounds-checked, and the significant modeling limitation around shaping/combining marks. It stops short of describing failure behavior (malformed base64, non-sfnt input) and the response shape is only implied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose is front-loaded in the first clause, which is good, but the remainder is a dense run-on and the text is visibly truncated mid-parenthesis ('combining marks and complex scripts'), leaving a dangling fragment. Most clauses earn their place, but the presentation undermines readability.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter, no-output-schema, no-annotation tool, the description covers what is read, what is reported (missing code points, width result), limits, and known inaccuracies. The main gaps are the truncated final sentence and the missing explanation of how the two optional width parameters interact.

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 75% and the schema already documents fontBase64 as sfnt-not-WOFF and maxWidthPx's widest-line-split-on-\n rule. The description reinforces the 2 MB and 5000-character bounds and ties the width test to advance widths, but it does not clarify the coupling between fontSizePx and maxWidthPx (whether one requires the other, or what happens if only maxWidthPx is supplied). Baseline 3 is appropriate.

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 question it answers ('does this font have glyphs for this text, and does it fit the box') and the concrete mechanism: missing-code-point listing via cmap formats 4 and 12, plus hmtx advance-width summation for a pixel width test. That is far more specific than the sibling names font-convert / font-face-css / font-glyph-svg, which are all transformations rather than checks.

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?

Names the operating context explicitly ('for an agent about to render text in a fixed font'), which tells the agent when this tool is the right call. It also states an exclusion ('does not apply kerning, ligatures or shaping'), but never points to a named alternative or says when not to use it at all.

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