# Design a piece of furniture

URL: https://docs.ajusteur.com/guides/piece

Start from a preset, change it to the customer's sizes, check it and draw it

A piece is anything made of 18 mm board: a sideboard, a desk, a bookcase, a bed. The engine reads a strict JSON spec. You start from the nearest preset, change it, and check it until it passes. The [`design_piece` prompt](/mcp/prompts) starts the same conversation in one command.

## The calls [#the-calls]

### Start from a preset [#start-from-a-preset]

The answer carries the spec and what the engine computed from it. The presets are listed in the tool's schema.

<Tabs items={["Arguments", "Answer"]}>
<Tab value="Arguments">

```json title="design_piece_from_preset"
{
  "preset": "sideboard"
}
```

</Tab>
<Tab value="Answer">

```json
{
  "ok": true,
  "spec": {
    "name": "Sideboard",
    "base": "legs",
    "handles": "bar",
    "top": {
      "t": 18
    },
    "boxes": [
      {
        "w": 1800,
        "h": 700,
        "d": 450,
        "top": "panel",
        "columns": [
          {
            "zones": [
              {
                "kind": "doors",
                "shelves": 1
              }
            ]
          },
          {
            "zones": [
              {
                "kind": "drawers",
                "count": 3
              }
            ]
          },
          {
            "zones": [
              {
                "kind": "doors",
                "shelves": 1
              }
            ]
          }
        ]
      }
    ]
  },
  "summary": "…boxes, boards, hardware and warnings…",
  "say": "Sideboard comes out at 1800 wide, 868 high and 450 deep, in millimetres, and follows the workshop's rules. Nothing here is a price."
}
```

</Tab>
</Tabs>

### Change it and check it [#change-it-and-check-it]

The customer wants it 2000 mm wide. Change the spec and send the whole spec back.

<Tabs items={["Arguments", "Answer"]}>
<Tab value="Arguments">

```json title="design_piece_check"
{
  "spec": {
    "name": "Dining room sideboard",
    "base": "legs",
    "handles": "bar",
    "top": {
      "t": 18
    },
    "boxes": [
      {
        "w": 2000,
        "h": 700,
        "d": 450,
        "top": "panel",
        "columns": [
          {
            "zones": [
              {
                "kind": "doors",
                "shelves": 1
              }
            ]
          },
          {
            "zones": [
              {
                "kind": "drawers",
                "count": 3
              }
            ]
          },
          {
            "zones": [
              {
                "kind": "doors",
                "shelves": 1
              }
            ]
          }
        ]
      }
    ]
  }
}
```

</Tab>
<Tab value="Answer">

```json
{
  "ok": true,
  "spec": "…the spec as the engine read it…",
  "summary": {
    "sizeMm": {
      "w": 2000,
      "h": 868,
      "d": 450
    },
    "boxes": [
      {
        "id": "A",
        "label": "box",
        "widthMm": 2000,
        "heightMm": 700,
        "depthMm": 450,
        "fitOut": [
          "2 doors, 1 shelf",
          "3 drawers",
          "2 doors, 1 shelf"
        ]
      }
    ],
    "partCount": 33,
    "boardsToOrder": {
      "thick18": 3,
      "thin9": 2
    },
    "hardware": [
      {
        "item": "Hinges, soft-close 35 mm",
        "qty": 8
      },
      {
        "item": "Drawer runners 400, pairs",
        "qty": 3
      },
      {
        "item": "Handles",
        "qty": 7
      },
      {
        "item": "Shelf pins",
        "qty": 8
      },
      {
        "item": "Adjustable legs",
        "qty": 6
      },
      {
        "item": "8 mm dowels, glue, screws",
        "qty": "1 lot"
      },
      {
        "item": "Edge banding",
        "qty": "1 lot"
      }
    ],
    "glassDoors": 0,
    "warnings": []
  },
  "say": "Dining room sideboard comes out at 2000 wide, 868 high and 450 deep, in millimetres, and follows the workshop's rules. Nothing here is a price."
}
```

</Tab>
</Tabs>

### Unknown fields are errors [#unknown-fields-are-errors]

Nothing a customer asked for is dropped silently. Send a field the engine does not know and it names the ones it does:

```json
{
  "ok": false,
  "errors": [
    "spec.colour is not a field here. Fields: name, boxes, frames, base, baseH, fronts, handles, grain, fitted, top, panels, t, notes, legs. Put what the spec cannot say in \"notes\"."
  ],
  "say": "The spec needs a correction: spec.colour is not a field here. Fields: name, boxes, frames, base, baseH, fronts, handles, grain, fitted, top, panels, t, notes, legs. Put what the spec cannot say in \"notes\"."
}
```

Put what the spec cannot say, such as a colour, in the brief of the request link. Look up materials by what they are with [`materials_list`](/tools/materials_list).

### Describe it and draw it [#describe-it-and-draw-it]

> Dining room sideboard, 2000 mm wide, 868 mm high and 450 mm deep, made to your sizes from 18 mm board, with 2 doors, 1 shelf, 3 drawers, 2 doors, 1 shelf.

![Dining room sideboard, front elevation](/drawings/sideboard.svg)

### Estimate [#estimate]

Call [`estimate_get`](/tools/estimate_get) with `{ "design": { "kind": "piece", "spec": … } }`. It answers the same way for every family: grouped totals, or `blocked` with each missing rate named.

### Hand over [#hand-over]

When the customer is happy, call [`request_link`](/tools/request_link) with the design and a brief in their own words. Leave names and contact details out. Give them the link as it is. They add how to reach them on ajusteur.com and send. Ajusteur reviews the design, visits, measures and sends a quote.

```json title="request_link"
{
  "design": "…the design from the step before, unchanged…",
  "brief": "What the customer told you about the room, the need and the timing."
}
```

<small>Every call on this page ran against the engine when the docs were built, with an empty rate book. This page is generated. Do not edit it by hand.</small>

