> ## Documentation Index
> Fetch the complete documentation index at: https://ekso.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Constraint

> MCP tools for managing field-level validation constraints on items.

## get\_constraint\_list

Get all constraints for this tenant. Constraints define field-level validation rules on items (mutual exclusion between field values).

| Property      |     |
| ------------- | --- |
| **Read-only** | Yes |

### Parameters

None.

### Returns

A list of `DataConstraint` objects with constraint details including source field, target field, target mode (Include/Exclude), and associated containers.

***

## get\_constraints\_for\_container

Get all constraints that belong to a specific container.

| Property      |     |
| ------------- | --- |
| **Read-only** | Yes |

### Parameters

| Parameter     | Type   | Required | Description                                                                |
| ------------- | ------ | -------- | -------------------------------------------------------------------------- |
| `containerId` | string | Yes      | Container ID. Use [`get_containers`](/mcp-tools/container#get_containers). |

### Returns

A list of `DataConstraint` objects for the specified container.

***

## create\_constraint

Create a new constraint. Constraints define: when `sourceFieldId` has value `sourceFieldDataId`, then `targetFieldId` is constrained to `targetFieldDataId` values.

| Property      |    |
| ------------- | -- |
| **Read-only** | No |

### Parameters

| Parameter           | Type      | Required | Default   | Description                                                                                  |
| ------------------- | --------- | -------- | --------- | -------------------------------------------------------------------------------------------- |
| `name`              | string    | Yes      | —         | Constraint name.                                                                             |
| `sourceFieldId`     | string    | Yes      | —         | The trigger field ID. Use [`get_custom_field_list`](/mcp-tools/field#get_custom_field_list). |
| `sourceFieldDataId` | string    | Yes      | —         | The trigger field value ID.                                                                  |
| `targetFieldId`     | string    | Yes      | —         | The constrained field ID.                                                                    |
| `targetFieldDataId` | string\[] | No       | `[]`      | Target field value IDs.                                                                      |
| `targetMode`        | string    | No       | `Include` | `Include` or `Exclude` — whether target values are allowed or disallowed.                    |
| `containerIds`      | string\[] | No       | `[]`      | Container IDs this constraint applies to.                                                    |

### Returns

The created `DataConstraint`. Requires super admin.

***

## update\_constraint

Update an existing constraint. Only provided fields are updated.

| Property      |    |
| ------------- | -- |
| **Read-only** | No |

### Parameters

| Parameter           | Type      | Required | Description                                                           |
| ------------------- | --------- | -------- | --------------------------------------------------------------------- |
| `constraintId`      | string    | Yes      | The constraint ID. Use [`get_constraint_list`](#get_constraint_list). |
| `name`              | string    | No       | New constraint name.                                                  |
| `targetFieldDataId` | string\[] | No       | New target field value IDs.                                           |
| `targetMode`        | string    | No       | `Include` or `Exclude`.                                               |

### Returns

The updated `DataConstraint`. Requires super admin.

***

## delete\_constraint

Delete a constraint.

| Property      |    |
| ------------- | -- |
| **Read-only** | No |

### Parameters

| Parameter      | Type   | Required | Description                                                           |
| -------------- | ------ | -------- | --------------------------------------------------------------------- |
| `constraintId` | string | Yes      | The constraint ID. Use [`get_constraint_list`](#get_constraint_list). |

### Returns

A confirmation message. Requires super admin.
