API & MCP
Everything a person can do on Font Monospacer, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminafontmonospace.usefulweb.app/api/v1/calculate– run Font MonospacerGET https://luminafontmonospace.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Font Monospacer
Upload a TTF or WOFF font with TrueType outlines. Every character gets the same width (taken from the digit 0, the average letter, the widest character or your own value); letters are centred in their cell or keep their side-bearing balance, and letters that are too wide are narrowed or may stick out. You get a renamed, verified TTF or WOFF marked as monospaced, read back with Lumina's own font reader.
| Field | Type | Default | Description |
|---|---|---|---|
font (required) | file | — | Font (TTF or WOFF with TrueType outlines; up to 10 MB; uploaded to the server) |
width | select (zero, average, widest, custom) | "zero" | Cell width |
customWidth | integer | 600 | Custom cell width (thousandths of an em, e.g. 600) |
fit | select (condense, overhang) | "condense" | Glyphs wider than the cell |
align | select (center, proportional) | "center" | Placement in the cell |
margin | number | 4 | Space on each side of narrowed glyphs (% of the cell) |
doubleWide | boolean | false | Give very wide glyphs (1.5 cells or more) two cells |
familyName | text | — | New font name (empty = original name + Monospaced) |
format | select (ttf, woff) | "ttf" | Output format |
axes | text | — | Freeze a variable font at (e.g. wght=700; empty = default instance) |
sample | text | — | Sample text for the preview |
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://luminafontmonospace.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_font_monospace - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-font-monospace
{
"mcpServers": {
"lumina-font-monospace": { "type": "http", "url": "https://luminafontmonospace.usefulweb.app/mcp" }
}
}