API & MCP

Everything a person can do on Threadsmith, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

  • GET https://threadsmith.usefulweb.site/api/v1/tools – catalog
  • GET https://threadsmith.usefulweb.site/api/v1/tools/{id} – inputs, output schema, examples
  • POST https://threadsmith.usefulweb.site/api/v1/tools/{id}/calculate – run a tool
  • GET https://threadsmith.usefulweb.site/api/v1/workflows · POST https://threadsmith.usefulweb.site/api/v1/workflows/{id}/run
  • OpenAPI 3.1: /openapi.json · /openapi.yaml
  • Errors: application/problem+json; 422 includes per-field errors.

Tools on Threadsmith

  • Threadsmith Digitizer – Turn shapes, SVG paths, text or a whole project into embroidery stitches with stats and preview. threadsmith_digitize
  • Threadsmith Stitch File Writer – Write DST, PES, JEF or EXP embroidery machine files from a stitch list or a Threadsmith project. threadsmith_stitch_file
  • Threadsmith Design Stats – Stitch count, colours, trims, thread, sewing time and density of a DST, PES, JEF or EXP file. threadsmith_design_stats
  • Threadsmith Sequence Optimizer – Reorder the stitch segments of a DST, PES, JEF or EXP file for fewer trims, jumps and colour stops. threadsmith_sequence_optimizer
  • Threadsmith Pattern Block Drafter – Draft skirt, bodice, sleeve and trouser blocks from your measurements as tiled PDF, SVG or DXF. threadsmith_pattern_block
  • Threadsmith Marker Layout – Lay sewing pattern pieces on your fabric width with the grain respected; get length and efficiency. threadsmith_marker_layout
  • Path Boolean Operations (SVG) – Union, intersect, subtract or exclude two SVG paths, or remove the overlaps of one path. threadsmith_path_boolean

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://threadsmith.usefulweb.site/mcp – protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake).
  • Tools: threadsmith_digitize, threadsmith_stitch_file, threadsmith_design_stats, threadsmith_sequence_optimizer, threadsmith_pattern_block, threadsmith_marker_layout, threadsmith_path_boolean
  • Local stdio connector: node src/mcp-stdio.ts
{
  "mcpServers": {
    "usefulweb": { "type": "http", "url": "https://threadsmith.usefulweb.site/mcp" }
  }
}