Skip to main content

Add and Manage Fields

Fields can be added when creating the entity (via generate_entity) or afterwards using manage_custom_fields.

MCP Tool: manage_custom_fields

Profile: advanced

Manages custom fields of an entity. Allows listing, adding, updating, and deleting user-created fields. Custom fields are NOT affected by metadata import/export.

Parameters

ParameterTypeRequiredDescription
actionstringYes"list", "add", "update", "delete"
entityNamestringYesEntity name
fieldIdstringConditionalField ID (required for update and delete)
typestringNoFilter for list: "custom", "system", "all". Default: "custom"
fieldDataobjectConditionalField data (required for add and update)

List fields

manage_custom_fields({
action: "list",
entityName: "clientes",
type: "all"
})

Response:

{
"success": true,
"entity": "clientes",
"filter": "all",
"count": 5,
"fields": [
{
"id": "uuid",
"name": "Nombre",
"fieldKey": "nombre",
"fieldType": "text",
"isSystem": false,
"isRequired": true,
"description": "Nombre del cliente",
"config": {}
}
]
}

Add a field

manage_custom_fields({
action: "add",
entityName: "clientes",
fieldData: {
name: "Direccion",
fieldKey: "direccion",
fieldType: "text",
description: "Direccion del cliente",
isRequired: false
}
})

For fields with configuration:

manage_custom_fields({
action: "add",
entityName: "clientes",
fieldData: {
name: "Estado",
fieldKey: "estado",
fieldType: "select",
config: {
options: ["activo", "inactivo", "suspendido"]
}
}
})

Required fields in fieldData for add:

  • name -- Display name
  • fieldKey -- Technical key (snake_case)
  • fieldType -- Data type

Update a field

manage_custom_fields({
action: "update",
entityName: "clientes",
fieldId: "uuid-del-campo",
fieldData: {
name: "Nombre completo",
isRequired: true,
description: "Nombre y apellido del cliente"
}
})

Updatable fields: name, description, isRequired, isUnique, isVisible, displayOrder, config.

Delete a field

manage_custom_fields({
action: "delete",
entityName: "clientes",
fieldId: "uuid-del-campo"
})

Only custom fields (isSystem=false) can be deleted. System fields are protected.

System vs Custom fields

TypeCreated byEditableAffected by import/export
Systemgenerate_entity / metadata importNoYes
Custommanage_custom_fieldsYesNo
Creado con Fyso