> For the complete documentation index, see [llms.txt](https://linparlab.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://linparlab.gitbook.io/docs/reference/repair-rules.md). Agents can also search and read this documentation through its [MCP server](https://linparlab.gitbook.io/docs/~gitbook/mcp).

# Repair Rules & Examples

Replace the default iron rule in the existing rules section to use iron nuggets as an alternative. Keep the original equipment list if other iron tools and armor should remain repairable.

```yaml
rules:
  iron:
    items: [IRON_SWORD, IRON_PICKAXE]
    ingredients: [IRON_INGOT, IRON_NUGGET]
    durability-per-material: 20
```

Both payments have the same base yield. Set the list order according to your economy. Remove the nugget alternative if that yield makes nuggets too cheap. Modern material names are accepted where the server can resolve them. Options unavailable on a server can be skipped.

## Test a new rule

1. Reload with `/repair reload` and read the validation output.
2. Hold the worn tool and run `/repair debug item`.
3. Carry only the first ingredient and verify the cost and debit.
4. Repeat with only the alternative.
5. Check a vanilla lookalike when testing a provider rule.

See [materials.yml](https://linparlab.gitbook.io/docs/configuration/materials.md), [Cross-Provider Repairs](https://linparlab.gitbook.io/docs/integrations/cross-provider-repairs.md) and [Custom Model Data](https://linparlab.gitbook.io/docs/integrations/custom-model-data.md).
