Skip to main content
Glama

upsert_custom_field

DestructiveIdempotent

Define or change (pass id) a custom field — admins only. Required: entity, label. Optional: key (derived from the label if omitted; cannot change later), type (default text), required, options (for select/multiselect), sort_order, active (false hides it without deleting values).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "entity": "<entity>",
      "label": "<label>"
    },
    "name": "upsert_custom_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoID of an existing custom field to change; omit to create a new one
keyNoTechnical key; derived from the label if omitted, cannot be changed later
typeNoField type: text, textarea, number, date, boolean, select or multiselect (default text)
labelYesLabel
activeNoWhether the entry is active
entityYesArea the field belongs to: contacts, accounts, agreements, leads or a module table (mod_…)
optionsNoAllowed values for select/multiselect fields
requiredNoWhether a value must be filled in
sort_orderNoPosition of the field in the display order

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • addedInput schema / properties / active / description
      Added value: +"Whether the entry is active"
    • addedInput schema / properties / entity / description
      Added value: +"Area the field belongs to: contacts, accounts, agreements, leads or a module table (mod_…)"
    • addedInput schema / properties / id / description
      Added value: +"ID of an existing custom field to change; omit to create a new one"
    • addedInput schema / properties / key / description
      Added value: +"Technical key; derived from the label if omitted, cannot be changed later"
    • addedInput schema / properties / label / description
      Added value: +"Label"
    • addedInput schema / properties / options / description
      Added value: +"Allowed values for select/multiselect fields"
    • addedInput schema / properties / required / description
      Added value: +"Whether a value must be filled in"
    • addedInput schema / properties / sort_order / description
      Added value: +"Position of the field in the display order"
    • addedInput schema / properties / type / description
      Added value: +"Field type: text, textarea, number, date, boolean, select or multiselect (default text)"
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare idempotentHint=true, destructiveHint=true and readOnlyHint=false, so the safety profile is partly given. The description adds real context beyond them: the admin-only authorization requirement, that the key is immutable once set, and that active=false hides the field without deleting stored values — which clarifies the scope of the destructive hint. It does not explain what happens to existing values if type changes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

One dense sentence that front-loads required versus optional parameters and annotates each with a parenthetical rule. It is efficient with no wasted clauses, though the em-dash chain is terse and slightly harder to scan than a short list.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive 9-parameter upsert with no output schema, the definition omits what is returned, whether changing type is permitted or breaks existing values, and how permission failures surface. The admin-only note helps, but meaningful gaps remain for a mutation of this complexity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so 3 is the baseline, but the description adds cross-parameter rules the schema lacks: key is derived from label when omitted and cannot change later, type defaults to text, options are only meaningful for select/multiselect, and active=false hides without deleting. It leaves entity/module-table format and type-change effects unaddressed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource — define or change a custom field — and distinguishes create from update via the id parameter. This separates it clearly from read-only siblings like list_custom_fields and destructive ones like delete_custom_field.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Makes explicit that admins only may call it and that passing id switches from create to update, plus when options apply and what active=false does. It stops short of naming sibling alternatives, but the create/update routing is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.