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

## Parameters

| name | type | default | description |
|---|---|---|---|
| `*items` | `Any` | — | pre-built contribution objects (e.g. a `ViewContribution`) to register when the tool mounts |

## Example

```python
from lsdtools.advanced import ViewContribution

tool.contribute(ViewContribution("map3d", "3D Map", factory=build_map))
```

## Notes

The escape hatch for contributions the declarative API can't express — most often a custom GTK
`ViewContribution`. Pass a **lazy factory** that imports GTK only when the view is built, so
headless mounts stay safe. The items are flushed and attributed at [`mount`](/docs/api-tool-mount).
Returns `self` for chaining.

## See also

**API:** [view](/docs/api-tool-view) · [mount](/docs/api-tool-mount) · [Advanced](/docs/api-advanced)

**Guides:** [The Tool object](/docs/tools-tool-object)
