MCPOutils MCP/Champs personnalisés

Champs personnalisés

Définir des champs personnalisés et fixer leurs valeurs sur les clients.

list_custom_field_definitions

Readcustom-fields:read

List the agency's custom-field schema for locations or clients — the extra fields an agency has defined beyond the built-in profile fields (e.g. "Franchise ID", "Contract renewal date"). Use this before get_custom_field_values or set_custom_field_value to discover what keys/types exist. Each definition has an id, an immutable key (used with set_custom_field_value), a label, a type (text/number/date/single_select/multi_select), whether it's required, its select options (for select types), and its display order. Archived definitions are excluded. You don't pass an agency — it comes from your credentials.

Paramètres
entityType"location" | "client"obligatoire
Which entity's custom fields to list (required).
Exemple de requête
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_custom_field_definitions",
    "arguments": {
      "entityType": "location"
    }
  }
}
Exemple de réponse
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.

MCPOutils MCP/Champs personnalisés/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.

Paramètres
entityType"location" | "client"obligatoire
Which entity this field applies to (required).
labelstringobligatoire
The field's display label (required), e.g. "Franchise ID".
type"text" | "number" | "date" | "single_select" | "multi_select"obligatoire
The field's value type (required).
requiredbooleanfacultatif
Whether the field is required. Soft — never blocks creating the entity itself. Defaults to false.
optionsstring[]facultatif
The selectable options. Required (at least one) when type is single_select or multi_select.
Exemple de requête
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "create_custom_field",
    "arguments": {
      "entityType": "location",
      "label": "string",
      "type": "text"
    }
  }
}
Exemple de réponse
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.

MCPOutils MCP/Champs personnalisés/update_custom_field

update_custom_field

Writecustom-fields:write

Edit an existing custom-field definition's label, required flag, select options, or display order. The field's type and key cannot be changed after creation — to change the type, archive this field with delete_custom_field and create a new one. Pass only the fields you want to change. Identify the field by its id (from list_custom_field_definitions). You don't pass an agency — it comes from your credentials.

Paramètres
definitionIdstringobligatoire
The id of the custom-field definition to update (required).
labelstringfacultatif
New display label.
requiredbooleanfacultatif
Whether the field is required.
optionsstring[]facultatif
Replaces the selectable options (for single_select / multi_select fields).
ordernumberfacultatif
New display order (lower shows first).
Exemple de requête
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_custom_field",
    "arguments": {
      "definitionId": "string"
    }
  }
}
Exemple de réponse
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.

MCPOutils MCP/Champs personnalisés/delete_custom_field

delete_custom_field

Writecustom-fields:write

Archive a custom-field definition, removing it from the schema. This is a soft delete — previously stored values for this field are retained on each entity but the field itself no longer appears in list_custom_field_definitions or accepts new values via set_custom_field_value. Identify the field by its id (from list_custom_field_definitions). You don't pass an agency — it comes from your credentials.

Paramètres
definitionIdstringobligatoire
The id of the custom-field definition to archive (required).
Exemple de requête
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_custom_field",
    "arguments": {
      "definitionId": "string"
    }
  }
}
Exemple de réponse
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.

MCPOutils MCP/Champs personnalisés/get_custom_field_values

get_custom_field_values

Readcustom-fields:read

Get the custom-field values currently set on one location or client. Returns a { key: value } bag (empty object if none are set). Use list_custom_field_definitions first to see what keys exist. You don't pass an agency — it comes from your credentials, and an entity from another agency is never returned.

Paramètres
entityType"location" | "client"obligatoire
Which kind of entity entityId refers to (required).
entityIdstringobligatoire
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".
Exemple de requête
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_custom_field_values",
    "arguments": {
      "entityType": "location",
      "entityId": "string"
    }
  }
}
Exemple de réponse
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.

MCPOutils MCP/Champs personnalisés/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.

Paramètres
entityType"location" | "client"obligatoire
Which kind of entity entityId refers to (required).
entityIdstringobligatoire
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".
keystringobligatoire
The custom field's key (from list_custom_field_definitions), not its label.
valuestringfacultatif
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.
Exemple de requête
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "set_custom_field_value",
    "arguments": {
      "entityType": "location",
      "entityId": "string",
      "key": "string"
    }
  }
}
Exemple de réponse
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "..."
      }
    ]
  }
}

La forme de la réponse est indicative — le contenu réel dépend de l'outil et de vos données.