# materialize_plugin_source

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/plugins/marketplace/materialize_plugin_source)

Resolve or materialize a marketplace plugin entry to a plugin root.

## Signature

```python
materialize_plugin_source(
    marketplace: PluginMarketplace,
    plugin: MarketplacePluginEntry,
    *,
    rejections: list[str] | None = None,
) -> Path | None
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `marketplace` | `PluginMarketplace` | Yes | Marketplace containing the plugin. |
| `plugin` | `MarketplacePluginEntry` | Yes | Plugin entry. |
| `rejections` | `list[str] \| None` | No | Collects the reason for each source path this call rejected. An empty list after a `None` result means the source itself is unsupported rather than a path being unusable; see `unresolved_source_message`. (default: `None`) |

## Returns

`Path | None`

Resolved plugin root, or `None` for unsupported or unusable sources.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/2069079e09546060f5b52b2cd4f0e3c813e820f3/libs/code/deepagents_code/plugins/marketplace.py#L592)