API & MCP
Everything a person can do on Threadsmith Design Stats, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://threadsmithdesignstats.usefulweb.site/api/v1/calculate– run Threadsmith Design StatsGET https://threadsmithdesignstats.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Threadsmith Design Stats
Reads a Tajima DST, Brother PES, Janome JEF or Melco EXP file (or a stitch list) and reports stitches, jumps, trims, colour changes, size and hoop fit, thread length per colour with a bobbin estimate, sewing time at your machine speed and a thread-density check with the densest spots, plus a thread-look preview. A job estimate adds thread, cones and bobbins for many pieces, machine time on one or more heads and the cost.
| Field | Type | Default | Description |
|---|---|---|---|
file | file | — | Embroidery file. Tajima .dst, Brother .pes, Janome .jef or Melco .exp. |
stitches | textarea | — | Or: stitch list (JSON). Same format as threadsmith-stitch-file. |
colors | list | — | Thread colours in sewing order. Optional #rrggbb per colour block (DST/EXP files store no colours; PES/JEF colours are read from the file otherwise). |
spm | integer | 700 | Machine speed |
trimSeconds | number | 4 | Time per trim |
colorSeconds | number | 20 | Time per colour change |
hoop | select (50x50, 100x100, 130x180, 150x150, 160x260, 200x200, 200x300, 240x150, 360x200) | "130x180" | Hoop |
densityThreshold | number | 2.6 | Too-dense limit. Thread coverage per 1 mm cell above which the design is flagged (2.6 ≈ underlay + top + some overlap). |
pieces | integer | 1 | Pieces to sew. For the job estimate: thread, cones, bobbins, machine time and cost for this many pieces. |
heads | integer | 1 | Machine heads. Pieces sewn at the same time on a multi-head machine. |
hoopingSeconds | number | 0 | Hooping time per machine cycle |
coneLengthM | number | 5000 | Thread per cone |
conePrice | number | — | Price per cone (optional) |
bobbinLengthM | number | 100 | Thread per bobbin. Check the length printed on your pre-wound bobbins. |
bobbinPrice | number | — | Price per bobbin (optional) |
machineRatePerHour | number | — | Machine and operator cost per hour (optional) |
currency | text | "EUR" | Currency |
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://threadsmithdesignstats.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
threadsmith_design_stats - Local stdio connector:
node src/mcp-stdio.ts --tool=threadsmith-design-stats
{
"mcpServers": {
"threadsmith-design-stats": { "type": "http", "url": "https://threadsmithdesignstats.usefulweb.site/mcp" }
}
}