{"openapi":"3.1.0","info":{"title":"Joinerycalc: dovetail calculator","version":"1.0.0","description":"Exact layout of a through dovetail joint, for hand-cut joints and router templates. Hand mode: give the board width, the thicknesses of both boards, the number of tails, the pin width at its narrow end and the angle (degrees per side, 1:N slope ratio, included angle or degrees from horizontal), in mm or inches; the tail width is computed. Router mode: give the tail width instead; the pins are spaced evenly and the router template is sized. Returns every tail and pin position and width on both faces (they sum exactly to the board width), tail and pin lengths, the angle in all four conventions, and warnings. Given measured socket dimensions, also recommends tail widths that fit them. Deterministic: use this instead of computing dovetail geometry yourself. Free, no key. Also available as an MCP server at https://joinerycalc.com/mcp.","license":{"name":"MIT"}},"servers":[{"url":"https://joinerycalc.com"}],"paths":{"/api/v1/dovetail":{"post":{"operationId":"dovetailLayout","summary":"Compute the geometry of a dovetail joint","requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"unit":{"default":"mm","description":"Unit of every length in the request and in the response.","type":"string","enum":["mm","inch"]},"mode":{"default":"hand","description":"hand: give pinWidth, the tail width is computed. router: give tailWidth, the pins are spaced evenly.","type":"string","enum":["hand","router"]},"boardWidth":{"type":"number","exclusiveMinimum":0,"description":"Width of both boards across the joint. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"tailBoardThickness":{"type":"number","exclusiveMinimum":0,"description":"Thickness of the board the tails are cut on. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"pinBoardThickness":{"type":"number","exclusiveMinimum":0,"description":"Thickness of the board the pins are cut on. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"numberOfTails":{"type":"integer","minimum":1,"maximum":30,"description":"Number of tails."},"pinWidth":{"type":"number","exclusiveMinimum":0,"description":"Required in hand mode: pin width at its narrow end (the outside face of the pin board). Edge pins get the same narrow width. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"tailWidth":{"type":"number","exclusiveMinimum":0,"description":"Required in router mode: tail width at its wide end. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"angle":{"type":"number","exclusiveMinimum":0,"description":"Dovetail angle, read according to angleFormat. It must give a per-side angle from 1° to under 45°."},"angleFormat":{"default":"per_side_from_vertical","description":"How to read angle: degrees per side from vertical (router bits: 7, 8, 14), slope ratio N for 1:N (6 for 1:6), included angle in degrees, or degrees from horizontal.","type":"string","enum":["per_side_from_vertical","slope_ratio","included_angle","from_horizontal"]},"routerBitDiameter":{"type":"number","exclusiveMinimum":0,"description":"Router mode: dovetail bit diameter, at most the tail width. Default: 8 mm, or the smallest bit that cuts the depth of the tails if larger. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"guideBushingDiameter":{"type":"number","exclusiveMinimum":0,"description":"Router mode: guide bushing diameter, larger than the bit. Default: the bit diameter plus 7 mm. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"measuredSockets":{"description":"Socket dimensions as actually cut, measured on both sides. When given, the response recommends tail widths that fit them.","type":"object","properties":{"left":{"type":"object","properties":{"tipWidth":{"type":"number","exclusiveMinimum":0,"description":"Socket width on the inside face of the pin board, where the tail enters: the narrow side. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"baseWidth":{"type":"number","exclusiveMinimum":0,"description":"Socket width on the outside face of the pin board: the wide side. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"depth":{"type":"number","exclusiveMinimum":0,"description":"Socket depth: for through dovetails, the pin board thickness. Between 0.5 and 5000 mm (0.02 to 196.85 in)."}},"required":["tipWidth","baseWidth","depth"]},"right":{"type":"object","properties":{"tipWidth":{"type":"number","exclusiveMinimum":0,"description":"Socket width on the inside face of the pin board, where the tail enters: the narrow side. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"baseWidth":{"type":"number","exclusiveMinimum":0,"description":"Socket width on the outside face of the pin board: the wide side. Between 0.5 and 5000 mm (0.02 to 196.85 in)."},"depth":{"type":"number","exclusiveMinimum":0,"description":"Socket depth: for through dovetails, the pin board thickness. Between 0.5 and 5000 mm (0.02 to 196.85 in)."}},"required":["tipWidth","baseWidth","depth"]}},"required":["left","right"]},"svg":{"type":"boolean","default":false,"description":"Also return the drawings (isometric, marked-out tail board, router bit) as SVG markup."},"lang":{"type":"string","enum":["en","fr"],"default":"en","description":"Language of the messages and drawing labels. Numbers are the same in both."}},"required":["boardWidth","tailBoardThickness","pinBoardThickness","numberOfTails","angle"]}}}},"responses":{"200":{"description":"Geometry. Lengths in `summary` are in the requested unit; `analysisMm` is in mm.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean"},"mode":{"type":"string","enum":["hand","router"]},"unit":{"type":"string","enum":["mm","inch"]},"errors":{"type":"array","items":{"type":"string"},"description":"Why the request or the joint was refused. Empty when ok."},"warnings":{"type":"array","items":{"type":"string"},"description":"What makes the joint fragile or the measurements doubtful."},"summary":{"description":"Present when ok. Lengths in the requested unit.","type":"object","properties":{"angle":{"type":"object","properties":{"perSideDeg":{"type":"number"},"slopeRatio":{"type":"number"},"includedDeg":{"type":"number"},"fromHorizontalDeg":{"type":"number"}},"required":["perSideDeg","slopeRatio","includedDeg","fromHorizontalDeg"],"additionalProperties":false},"boardWidth":{"type":"number"},"numberOfTails":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tails":{"type":"object","properties":{"width":{"type":"number","description":"At the end (wide)."},"baseline":{"type":"number","description":"At the baseline (narrow)."},"length":{"type":"number"}},"required":["width","baseline","length"],"additionalProperties":false},"pins":{"type":"object","properties":{"width":{"type":"number","description":"Narrow end."},"wide":{"type":"number"},"edgeWide":{"type":"number","description":"Wide end of the edge pins."},"length":{"type":"number"}},"required":["width","wide","edgeWide","length"],"additionalProperties":false},"layout":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["edge-pin","tail","pin"]},"from":{"type":"number"},"to":{"type":"number"},"center":{"type":"number"},"width":{"type":"number"},"otherWidth":{"type":"number"}},"required":["kind","from","to","center","width","otherWidth"],"additionalProperties":false},"description":"Every piece on the outside face of the pin board, from the left edge. Positions are exact values rounded (the last one is the board width); widths are rounded on their own."},"routerTemplate":{"description":"Router mode only.","type":"object","properties":{"width":{"type":"number"},"length":{"type":"number"},"bitDiameter":{"type":"number"},"guideBushingDiameter":{"type":"number"},"minimumBitDiameter":{"type":"number"},"bitAssumed":{"type":"boolean"}},"required":["width","length","bitDiameter","guideBushingDiameter","minimumBitDiameter","bitAssumed"],"additionalProperties":false},"tailsForSockets":{"description":"With measuredSockets only: tail widths that fit them, tightest first.","type":"array","items":{"type":"object","properties":{"strategy":{"type":"string","enum":["tight_bias","balanced","loose_bias"]},"width":{"type":"number"},"baseline":{"type":"number"},"smallestClearance":{"type":"number","description":"Negative is interference."},"largestClearance":{"type":"number"}},"required":["strategy","width","baseline","smallestClearance","largestClearance"],"additionalProperties":false}}},"required":["angle","boardWidth","numberOfTails","tails","pins","layout"],"additionalProperties":false},"analysisMm":{"description":"The analysis kept from the original Joinery calculator, in mm. Its shape may change.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"drawings":{"description":"With `svg: true`: SVG markup.","type":"object","properties":{"isometric":{"type":"string"},"faceView":{"type":"string"},"routerBit":{"type":"string"}},"required":["isometric","faceView"],"additionalProperties":false}},"required":["ok","mode","unit","errors","warnings"],"additionalProperties":false}}}},"400":{"description":"Invalid input: `errors` names the fields.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":false},"errors":{"type":"array","items":{"type":"string"},"description":"Why the request or the joint was refused. Empty when ok."},"warnings":{"type":"array","items":{"type":"string"},"description":"What makes the joint fragile or the measurements doubtful."}},"required":["ok","errors","warnings"],"additionalProperties":false}}}},"405":{"description":"Not a POST.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":false},"errors":{"type":"array","items":{"type":"string"},"description":"Why the request or the joint was refused. Empty when ok."},"warnings":{"type":"array","items":{"type":"string"},"description":"What makes the joint fragile or the measurements doubtful."}},"required":["ok","errors","warnings"],"additionalProperties":false}}}},"413":{"description":"Body over 64 KB.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":false},"errors":{"type":"array","items":{"type":"string"},"description":"Why the request or the joint was refused. Empty when ok."},"warnings":{"type":"array","items":{"type":"string"},"description":"What makes the joint fragile or the measurements doubtful."}},"required":["ok","errors","warnings"],"additionalProperties":false}}}},"422":{"description":"The joint is not feasible: `errors` and `warnings` say why.","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean"},"mode":{"type":"string","enum":["hand","router"]},"unit":{"type":"string","enum":["mm","inch"]},"errors":{"type":"array","items":{"type":"string"},"description":"Why the request or the joint was refused. Empty when ok."},"warnings":{"type":"array","items":{"type":"string"},"description":"What makes the joint fragile or the measurements doubtful."},"summary":{"description":"Present when ok. Lengths in the requested unit.","type":"object","properties":{"angle":{"type":"object","properties":{"perSideDeg":{"type":"number"},"slopeRatio":{"type":"number"},"includedDeg":{"type":"number"},"fromHorizontalDeg":{"type":"number"}},"required":["perSideDeg","slopeRatio","includedDeg","fromHorizontalDeg"],"additionalProperties":false},"boardWidth":{"type":"number"},"numberOfTails":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tails":{"type":"object","properties":{"width":{"type":"number","description":"At the end (wide)."},"baseline":{"type":"number","description":"At the baseline (narrow)."},"length":{"type":"number"}},"required":["width","baseline","length"],"additionalProperties":false},"pins":{"type":"object","properties":{"width":{"type":"number","description":"Narrow end."},"wide":{"type":"number"},"edgeWide":{"type":"number","description":"Wide end of the edge pins."},"length":{"type":"number"}},"required":["width","wide","edgeWide","length"],"additionalProperties":false},"layout":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["edge-pin","tail","pin"]},"from":{"type":"number"},"to":{"type":"number"},"center":{"type":"number"},"width":{"type":"number"},"otherWidth":{"type":"number"}},"required":["kind","from","to","center","width","otherWidth"],"additionalProperties":false},"description":"Every piece on the outside face of the pin board, from the left edge. Positions are exact values rounded (the last one is the board width); widths are rounded on their own."},"routerTemplate":{"description":"Router mode only.","type":"object","properties":{"width":{"type":"number"},"length":{"type":"number"},"bitDiameter":{"type":"number"},"guideBushingDiameter":{"type":"number"},"minimumBitDiameter":{"type":"number"},"bitAssumed":{"type":"boolean"}},"required":["width","length","bitDiameter","guideBushingDiameter","minimumBitDiameter","bitAssumed"],"additionalProperties":false},"tailsForSockets":{"description":"With measuredSockets only: tail widths that fit them, tightest first.","type":"array","items":{"type":"object","properties":{"strategy":{"type":"string","enum":["tight_bias","balanced","loose_bias"]},"width":{"type":"number"},"baseline":{"type":"number"},"smallestClearance":{"type":"number","description":"Negative is interference."},"largestClearance":{"type":"number"}},"required":["strategy","width","baseline","smallestClearance","largestClearance"],"additionalProperties":false}}},"required":["angle","boardWidth","numberOfTails","tails","pins","layout"],"additionalProperties":false},"analysisMm":{"description":"The analysis kept from the original Joinery calculator, in mm. Its shape may change.","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"drawings":{"description":"With `svg: true`: SVG markup.","type":"object","properties":{"isometric":{"type":"string"},"faceView":{"type":"string"},"routerBit":{"type":"string"}},"required":["isometric","faceView"],"additionalProperties":false}},"required":["ok","mode","unit","errors","warnings"],"additionalProperties":false}}}}}}}}}