API & MCP
Everything a person can do on Will It Fit?, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://willitfit.usefulweb.site/api/v1/calculate– run Will It Fit?GET https://willitfit.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Will It Fit?
Enter the item’s length, width and height and the measurements along the delivery path. Will It Fit? tries every orientation, in-plane diagonal tilts and the classic moving-sofa corner calculation, then reports pass/fail per checkpoint with spare centimetres and how to carry the item.
| Field | Type | Default | Description |
|---|---|---|---|
itemLength (required) | number | — | Item length |
itemWidth (required) | number | — | Item width/depth |
itemHeight (required) | number | — | Item height |
clearance | number | 2 | Safety clearance. Subtracted from every opening dimension (hands, padding, wobble). |
doorWidth (required) | number | — | Door clear width. Measure between door stops with the door fully open. |
doorHeight (required) | number | — | Door clear height |
hallwayWidthBefore | number | — | Hallway width before corner. Leave empty to skip the corner check. |
hallwayWidthAfter | number | — | Hallway width after corner. Defaults to the width before the corner. |
ceilingHeight | number | 250 | Hallway ceiling height. Used to tilt the item upward in the corner. |
stairsWidth | number | — | Stair width. Leave empty to skip stairs. |
stairsHeadroom | number | — | Stair headroom (perpendicular to pitch) |
elevatorDoorWidth | number | — | Elevator door width. Leave elevator fields empty to skip. |
elevatorDoorHeight | number | — | Elevator door height |
elevatorCabinWidth | number | — | Elevator cabin width |
elevatorCabinDepth | number | — | Elevator cabin depth |
elevatorCabinHeight | number | — | Elevator cabin height |
roomWidth | number | — | Room width. Leave empty to skip the room check. |
roomDepth | number | — | Room depth |
roomHeight | number | — | Room height |
Example request
3-seat sofa through a flat door and corridor
curl -X POST https://willitfit.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"itemLength":210,"itemWidth":90,"itemHeight":85,"clearance":2,"doorWidth":80,"doorHeight":200,"hallwayWidthBefore":100,"hallwayWidthAfter":100,"ceilingHeight":250,"roomWidth":400,"roomDepth":350,"roomHeight":250}'
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://willitfit.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
will_it_fit - Local stdio connector:
node src/mcp-stdio.ts --tool=will-it-fit
{
"mcpServers": {
"will-it-fit": { "type": "http", "url": "https://willitfit.usefulweb.site/mcp" }
}
}