Skip to main content
Glama

Delete Custom Field

delete_custom_field
Destructive

Delete a custom field definition by id (GUID) or entity.fieldName, as the Settings page does. Soft: the field disappears from list_custom_fields and stops accepting new values, but every stored value is RETAINED, so re-creating the same entity.fieldName with save_custom_field (same type) restores the field and its values exactly. Values already written stay visible in the customFields map of the record read tools until the field is restored or the records are rewritten. The preview counts the records that carry a value. A field active price books price by cannot be deleted until those attributes are remapped. Requires an operator (unpinned) credential.

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": {
      "customField": "<customField>"
    },
    "name": "delete_custom_field"
  }
}

Input Schema

NameRequiredDescriptionDefault
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call.
customFieldYesThe custom field to delete: its id (GUID) or "entity.fieldName".
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
okNo
deletedNo
previewNo
expiresAtNo
customFieldNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the destructiveHint annotation: it discloses that the delete is soft, that stored values are retained, that values remain visible in customFields until restore/rewrite, that preview counts affected records, that price-book-referenced fields are blocked, and that an operator credential is required. The retention/reversibility nuance materially changes how an agent should treat a destructive-hinted tool.

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?

Front-loads the core action and identifier forms, then layers consequence, restoration, preview semantics, constraints, and auth in a logical order. Dense but mostly earned; the 'as the Settings page does' clause is the one piece of low-value filler.

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

Completeness5/5

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

For a destructive, two-step, credentialed mutation with an output schema, the description covers consequence, reversibility, blocking conditions, and auth requirements, leaving no critical decision-relevant gap.

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 the baseline is 3, but the description adds meaning beyond the schema by explaining what the preview actually reports (records carrying a value) and the restore semantics tied to the entity.fieldName identifier. It does not add syntax detail for idempotencyKey/previewReceipt beyond what the schema already says.

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 ('Delete a custom field definition') with both accepted identifiers, and explicitly distinguishes it from siblings by naming list_custom_fields (field disappears from it) and save_custom_field (restore path).

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?

Gives clear context for the preview/commit flow, the price-book blocking condition, and the restore alternative via save_custom_field with the same type. It does not give an explicit 'do not use this when...' for other delete tools, but the usage conditions it does state are concrete.

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.

Resources