API & MCP
Everything a person can do on Letterform Mask Comparison, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminaletterformcompare.usefulweb.site/api/v1/calculate– run Letterform Mask ComparisonGET https://luminaletterformcompare.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Letterform Mask Comparison
Paste two binary grids representing the same visible text to compare their ink shapes and proportions. Get visual similarity, Dice overlap, intersection-over-union and an aligned SVG overlay. The score compares supplied masks; it does not identify a font or express identity confidence.
| Field | Type | Default | Description |
|---|---|---|---|
reference (required) | textarea | "00100\n01010\n10001\n11111\n10001\n10001" | Reference grid (1 = ink, 0 = background) |
candidate (required) | textarea | "00100\n01010\n10001\n11111\n10001\n10001" | Candidate grid (same text) |
Example request
Identical letterforms
curl -X POST https://luminaletterformcompare.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"reference":"00100\n01010\n10001\n11111\n10001\n10001","candidate":"00100\n01010\n10001\n11111\n10001\n10001"}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://luminaletterformcompare.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_letterform_compare - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-letterform-compare
{
"mcpServers": {
"lumina-letterform-compare": { "type": "http", "url": "https://luminaletterformcompare.usefulweb.site/mcp" }
}
}