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

## Parameters

| name | type | default | description |
|---|---|---|---|
| `kind` | `str` | — | the source kind id, e.g. `"rest-api"` — used in the picker and in a load's `source_kinds=(...)` |
| `label` | `str` | `""` | the human name shown in the source picker (defaults to `kind`) |
| `config` | `dict \| UINode` | `None` | a UI tree whose field values are passed to the function as a dict |

## Example

```python
@tool.source("rest-api", label="REST API", config={"form": [{"text": {"name": "url"}}]})
def read(cfg) -> Table:
    return Table(fetch(cfg["url"]))
```

## Notes

The config's field values arrive as a plain dict; the function returns a `Table`. Once registered,
the kind appears in **every** source picker, and a `@tool.load` step can restrict itself to it via
`source_kinds=("rest-api", …)`.

## See also

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

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