MCPCatalog
Create a custom field
distru-create-custom-fieldWriteAdds a custom field to one entity type, e.g. a Lab dropdown on packages; it then appears on every record of that type.
Inputs
Every tool also takes the common inputs.
| Field | Type | Required | Description |
|---|---|---|---|
| entityType | enumASSEMBLYBATCHCOMPANYCONTACTINVOICEPACKAGEPRODUCTPURCHASE_ORDERRETURNSALES_ORDERSTOCK_TRANSFERTASK | Yes | |
| name | string | Yes | Up to 70 characters; unique within the entity type. |
| fieldType | enumCHECKBOXDATEDROPDOWNTEXT | Yes | DATE: a day, no time. DROPDOWN: one option. CHECKBOX: any number of options. Cannot be changed later. |
| description | string | No | Up to 100 characters. |
| required | boolean | No | Must be filled in on every record. |
| options | string[] | No | Required for DROPDOWN and CHECKBOX, not allowed otherwise. Unique; no commas. |
Output
Presence on a nested field assumes its parent exists.
| Field | Type | Presence |
|---|---|---|
| customField | object | Always |
| customField. | string | Always |
| customField. | string | Always |
| customField. | string | Can be null |
| customField. | enumASSEMBLYBATCHCOMPANYCONTACTINVOICEPACKAGEPRODUCTPURCHASE_ORDERRETURNSALES_ORDERSTOCK_TRANSFERTASK | Can be null |
| customField. | enumCHECKBOXDATEDROPDOWNTEXT | Always |
| customField. | boolean | Always |
| customField. | object[] | Always |
| customField. | string | Always |
| customField. | boolean | Always |
What the AI reads
Adds a custom field to one entity type, e.g. a Lab dropdown on packages; it then appears on every record of that type. It defines the field only: it sets no value on any record. Check distru-search-custom-fields first so you don't add a field that already exists; to change one use distru-update-custom-field. Requires the custom fields settings permission.