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

## Parameters

| name | type | default | description |
|---|---|---|---|
| `dialog` | `dict \| UINode` | `None` | a UI spec overriding the auto-generated form; every field name is checked against the parameters at import |
| `outputs` | `list[str]` | `None` | named output ports — the function returns `{"a": Table, …}`, selected downstream via `step.output("a")` |
| `graph_outputs` | `dict` | `None` | `{name: type}` read-only scalars set via `ctx.set_output(...)`, shown on the node card and excluded from the cache key |
| `source_kinds` | `tuple` | `None` | narrows the `Source` picker to these kinds, e.g. `("file", "sql")` |
| `overrides` | `str` | `None` | make this a drop-in variant of another package's node, e.g. `"mim.load"` |
| `override_mode` | `str` | `"replace"` | `"replace"` wins the overridden identity by default; `"coexist"` keeps both addable |

## Example

```python
@tool.load
def numbers(count: int = 5) -> Table:
    return Table({"n": list(range(count))})
```

Inject a source reader and narrow the picker:

```python
@tool.load(source_kinds=("file", "sql"))
def load_data(src: Source) -> Table:
    return src.read()
```

## Notes

A load step takes **no** `Table` input ports — it is the source of data, and passing one raises at
decoration time. A `src: Source` parameter injects a reader; a `StepContext` parameter may be
injected for progress/cancel, but a `Context` parameter is rejected (a step must not read project
state the cache can't see). `override_mode` is `"replace"` (default) or `"coexist"`.

## See also

**API:** [shape](/docs/api-tool-shape) · [deliver](/docs/api-tool-deliver) · [source](/docs/api-tool-source) · [Source](/docs/api-source)

**Guides:** [Load steps](/docs/tools-load) · [Parameters vs ports](/docs/tools-params-ports) · [A file loader](/docs/ex-file-loader)
