# rebuild_hierarchy (/mcp/tools/rebuild_hierarchy)

`rebuild_hierarchy` · Changes data

Rebuild the category tree (product Owners and Admins, once an hour)

Regroups the features into new categories from scratch with the AI, keeping the categories and placements people made; the AI's own categories are replaced and this cannot be undone. Refused (`conflict`, rule in `details.rule`) while the knowledge base is read or a grouping is queued, when there are no features, or within an hour of the last rebuild that did not fail (`details.retryAfter`: seconds to wait). It takes about a minute: check `get_hierarchy` every 30 seconds; it is done when its `build` status is completed or failed.

This can't be undone, so Heuristic asks the person first (see `confirm`).

Counts toward the lower limit on calls that start AI runs or knowledge base reads.

## Inputs

- Who can use it: Admins and the product's Owners
- Hints: Changes data, Can remove data
- Asks the person to confirm before it runs.
- Runs: [`rebuild_hierarchy`](/api/hierarchy/rebuild_hierarchy)
- Inputs:
  - `productId` (string, required): From `read_product` with action `list` or `get_me`.
  - `confirm` (boolean): True only after the person said yes to the question a first call answered with `confirmation_required`. Ignored when your app can show the person questions: Heuristic then asks them itself.
