# Tool.entity
URL: https://lsd.tools/docs/api-tool-entity
Updated: 2026-07-17

## Parameters

| name | type | default | description |
|---|---|---|---|
| `label` | `str` | `None` | the human name shown when creating the entity (defaults to a humanized function name) |
| `icon` | `str` | `"lsd-folder-symbolic"` | the symbolic icon name for the entity in the tree |

## Example

```python
@tool.entity
def drillholes(collar: str, survey: str):
    holes = load_collar(path=collar)
    return desurvey(t=holes, survey=survey)   # the terminal step
```

With a label and icon:

```python
@tool.entity(label="Block model", icon="lsd-grid-symbolic")
def blocks(size: float = 10.0):
    return make_grid(size=size)
```

## Notes

On a **builder function** the signature becomes the entity's declarative parameters; the body runs
once at creation to wire the child steps and must **return the terminal step(s)**. A builder takes
no `Table` input ports — wire steps inside the builder. On a hand-written **`Entity` subclass**
`@tool.entity` just registers the type (attribution + wizard interop) and returns it unchanged.

## See also

**API:** [load](/docs/api-tool-load) · [template](/docs/api-tool-template)

**Guides:** [Entity types](/docs/tools-entities) · [An import template](/docs/ex-import-template)
