Skip to main content
Glama

Delete a custom field

sf_delete_custom_field

Delete a Salesforce custom field by its Tooling API Id (00N...). Obtain the Id via sf_list_custom_fields; then remove the field when MC_NEXT_ALLOW_METADATA_CHANGES is enabled.

Instructions

Delete a custom field via the Tooling API (DELETE /tooling/sobjects/CustomField/{id}). Requires the field's Tooling API Id — find it with sf_list_custom_fields. Gated behind MC_NEXT_ALLOW_METADATA_CHANGES=true.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldIdYesThe Tooling API Id of the CustomField record (starts with 00N).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose the HTTP mechanism, the prerequisite ID, and the feature gate. However, it does not explicitly state that deletion is permanent or describe side effects, permissions, or failure conditions, which would strengthen a destructive tool's transparency.

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

Conciseness5/5

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

Three short sentences, each earning its place: the action, the prerequisite, and the gate. No filler or repetition beyond what is necessary.

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

Completeness4/5

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

For a simple one-parameter delete operation, the description covers the endpoint, how to get the required ID, and the activation flag. Since there is no output schema, a brief note about the expected response would improve completeness, but nothing critical is missing for invoking the tool.

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; the description adds extra value by telling the agent how to obtain the fieldId via sf_list_custom_fields, supplementing the schema's format hint with a concrete lookup path.

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?

The description uses a specific verb, 'Delete a custom field,' and names the exact resource and API endpoint (DELETE /tooling/sobjects/CustomField/{id}). This clearly distinguishes it from sibling tools like sf_delete_custom_object and sf_list_custom_fields.

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?

The description gives clear actionable context: it requires the field's Tooling API Id and points to sf_list_custom_fields as the way to find it. It also states the gating flag, but it does not explicitly contrast this tool with deletion alternatives or state when not to use it.

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