Sandbox — LSD is in active testing. All systems operational·payments are test-mode (no real charges).
Overview Use Cases News Docs Tool Store Support Community Get LSD
All docs
Docs/ API Reference/ Tool/ entity
Tool· decorator

Tool.entity

registers a creatable entity type from a builder or an Entity subclass

Python
entity(*, label=None, icon="lsd-folder-symbolic")

Returns _EntityFactory — call it (or .build()) to create an entity; an Entity subclass is returned unchanged

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 · template

Guides: Entity types · An import template

By LSD Team · Last updated Jul 17, 2026 Ask on Discord View as Markdown