MCPMCP-Tools/Benutzerdefinierte Felder/set_custom_field_value
set_custom_field_value
Writecustom-fields:write
Set (or clear) one custom-field value on a location or client. The field must already exist — look it up with list_custom_field_definitions and pass its key. Passing null or an empty value clears the field. The value is validated against the field's type (text/number/date/single_select/multi_select) before saving. Returns the entity's full updated values bag. You don't pass an agency — it comes from your credentials.
Parameter
entityType"location" | "client"erforderlich
Which kind of entity entityId refers to (required).
entityIdstringerforderlich
The entity's id — a location's id (from list_locations / create_location) when entityType is "location", or a client's id (from list_clients / create_client) when entityType is "client".
keystringerforderlich
The custom field's key (from list_custom_field_definitions), not its label.
valuestringoptional
The new value. A string for text/date/single_select; also accepts a number for number fields or an array of strings for multi_select (the schema type here is advisory — the actual value is validated against the field's real type). Pass null/omit to clear.
Beispielanfrage
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "set_custom_field_value",
"arguments": {
"entityType": "location",
"entityId": "string",
"key": "string"
}
}
}Beispielantwort
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"content": [
{
"type": "text",
"text": "..."
}
]
}
}Die Antwortform dient nur zur Veranschaulichung — der tatsächliche Inhalt hängt vom Tool und Ihren Daten ab.