---
editLink: false
lastUpdated: false
---

[@salesforce/b2c-tooling-sdk](../../../modules.md) / [operations/code](../index.md) / FindCartridgesOptions

# Interface: FindCartridgesOptions

Defined in: [packages/b2c-tooling-sdk/src/operations/code/cartridges.ts:24](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/code/cartridges.ts#L24)

Options for finding cartridges.

## Extended by

- [`DeployOptions`](DeployOptions.md)
- [`WatchOptions`](WatchOptions.md)
- [`CartridgeDiscoveryOptions`](../../../cli/interfaces/CartridgeDiscoveryOptions.md)

## Properties

### exclude?

> `optional` **exclude**: `string`[]

Defined in: [packages/b2c-tooling-sdk/src/operations/code/cartridges.ts:28](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/code/cartridges.ts#L28)

Cartridge names to exclude

***

### firstMatchOnly?

> `optional` **firstMatchOnly**: `boolean`

Defined in: [packages/b2c-tooling-sdk/src/operations/code/cartridges.ts:46](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/code/cartridges.ts#L46)

When true, stop at the first matching cartridge and return only that one.
Useful for existence checks (e.g. workspace-type detection) where the full
list is not needed — it lets the underlying scan short-circuit instead of
enumerating every `.project` file. Filters from `include`/`exclude` are
applied while scanning, so the returned cartridge always satisfies them.

***

### include?

> `optional` **include**: `string`[]

Defined in: [packages/b2c-tooling-sdk/src/operations/code/cartridges.ts:26](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/code/cartridges.ts#L26)

Cartridge names to include (if empty, all are included)

***

### maxDepth?

> `optional` **maxDepth**: `number`

Defined in: [packages/b2c-tooling-sdk/src/operations/code/cartridges.ts:38](https://github.com/SalesforceCommerceCloud/b2c-developer-tooling/blob/67fb8580ac3c5b372617ee3ec3fc8f2bc9f16174/packages/b2c-tooling-sdk/src/operations/code/cartridges.ts#L38)

Maximum directory depth to recurse when searching for `.project` files,
counted in path segments relative to the search directory (so a cartridge
at `cartridges/<name>/.project` is depth 3). When omitted the search is
unbounded (default), preserving behavior for callers that expect a full
recursive walk. Bound this for untrusted/broad roots (e.g. an MCP server
that may be launched from a home directory) to avoid scanning the whole
filesystem tree.
