MCPFerramentas MCP/Campos personalizados/create_custom_field
create_custom_field
Writecustom-fields:write
Create a new custom-field definition for locations or clients — adds a new column of information every location (or client) can carry, beyond the built-in profile fields. A URL-safe key is generated automatically from the label (renaming the label later never changes the key or breaks stored values). select types (single_select / multi_select) require at least one option. New definitions are appended to the end of the display order. Returns the new definition, including its generated key — use that key with set_custom_field_value. You don't pass an agency — it comes from your credentials.
Parâmetros
entityType"location" | "client"obrigatório
Which entity this field applies to (required).
labelstringobrigatório
The field's display label (required), e.g. "Franchise ID".
type"text" | "number" | "date" | "single_select" | "multi_select"obrigatório
The field's value type (required).
requiredbooleanopcional
Whether the field is required. Soft — never blocks creating the entity itself. Defaults to false.
optionsstring[]opcional
The selectable options. Required (at least one) when type is single_select or multi_select.
Exemplo de solicitação
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "create_custom_field",
"arguments": {
"entityType": "location",
"label": "string",
"type": "text"
}
}
}Exemplo de resposta
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}O formato da resposta é ilustrativo — o conteúdo real depende da ferramenta e dos seus dados.