API & MCP

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

HTTP API

Threadsmith Sequence Optimizer

Reads an embroidery machine file (or a stitch list), splits it into the segments that are sewn without a jump or trim, and finds a sewing order with fewer trims, jumps and colour changes: segments may be sewn backwards, colour blocks with the same thread are merged, and segments whose stitches overlap keep their original order so the layering does not change. Every stitch is kept. You get the before/after counts, the sewing time saved and the optimised file in the same or another format, decoded again to prove that every penetration is still there.

Inputs of Threadsmith Sequence Optimizer
FieldTypeDefaultDescription
filefile—Embroidery file. Tajima .dst, Brother .pes, Janome .jef or Melco .exp.
stitchestextarea—Or: stitch list (JSON). Same format as threadsmith-stitch-file.
colorslist—Thread colours in sewing order. Optional #rrggbb per colour block. DST and EXP files store no colours, so blocks are only merged when you give their colours (PES/JEF colours are read from the file).
outputFormatselect (same, dst, pes, jef, exp)"same"Write the optimised file as
trimDistancenumber5Trim gaps of at least. Shorter gaps are jumped without a trim.
allowReversebooleantrueAllow sewing segments backwards
mergeColorsbooleantrueMerge colour blocks with the same thread. Only blocks whose stitches do not overlap anything sewn in between are moved together.
spminteger700Machine speed
labeltext"OPTIMIZED"Design label (DST/PES header)

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)

{
  "mcpServers": {
    "threadsmith-sequence-optimizer": { "type": "http", "url": "https://threadsmithsequenceoptimizer.usefulweb.site/mcp" }
  }
}