Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Delete Metadata

sf_delete_metadata
DestructiveIdempotent

Permanently deletes one or more Salesforce metadata components (e.g., CustomObjects, Fields, Flows) using the Metadata API, enabling removal of resources that could not be deleted before.

Instructions

Permanently deletes one or more metadata components of a given type via the Metadata API's deleteMetadata call — works for CustomObject, CustomField, Flow, GenAiFunction, GenAiPlugin, GenAiPlannerBundle, Bot, ApexClass, and most other metadata types. There was previously no way to remove anything created by this MCP server (sf_deploy_metadata only supports adding/updating components, not destructiveChanges) — diagnostic or abandoned metadata had nowhere to go. Deletes each fullName independently: check the response's deleted/errors lists rather than assuming all all-or-nothing. Some types have dependency order requirements (e.g. delete a Bot's GenAiFunction/GenAiPlugin/GenAiPlannerBundle before the Bot itself, delete CustomField before its parent CustomObject) — Salesforce will reject a delete that still has dependents, naming them in the error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fullNamesYesFull names of the components to delete, e.g. ['My_Object__c'] or ['My_Object__c.My_Field__c']. Deletes each independently — some may succeed while others fail; check the response's deleted/errors lists rather than assuming all-or-nothing.
metadataTypeYesMetadata type to delete, e.g. 'CustomObject', 'CustomField', 'Flow', 'GenAiFunction', 'GenAiPlugin', 'GenAiPlannerBundle', 'Bot'
Behavior5/5

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

The description goes well beyond the annotation flags (readOnlyHint=false, destructiveHint=true, idempotentHint=true). It discloses that deletes are independent per fullName, that responses must be checked for partial failures, and that dependency-order requirements exist (e.g., deleting a Bot before its children, CustomField before CustomObject). This rich behavioral detail is not present in the annotations and is crucial for safe usage.

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?

The description is moderately long but every sentence contributes value: it states the core operation, the motivation, the independent-delete behavior, and dependency warnings. It is front-loaded with the purpose and uses clear structure. While it could be slightly more compact, it is not verbose or redundant.

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?

Given the tool's moderate complexity (2 parameters, no output schema), the description is quite complete. It covers the operation, supported types, failure mode (check deleted/errors lists), and dependency constraints. It does not fully describe the response structure, but it references the key response fields, which is sufficient for an agent to infer the return format. Overall, it adequately prepares the agent for invoking the tool correctly.

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?

The input schema already has 100% description coverage for both parameters. The tool description adds context beyond the schema by explaining how fullNames are processed independently and how metadataType interacts with dependency rules. It also provides concrete examples (delete CustomField before CustomObject) that enrich the semantic understanding of the parameters.

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 opens with a specific action: 'Permanently deletes one or more metadata components of a given type via the Metadata API's deleteMetadata call'. It names common metadata types and explicitly contrasts with sf_deploy_metadata, which only adds/updates, clearly distinguishing this delete-oriented tool from its siblings.

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 provides clear context for when to use the tool: when metadata components need to be removed, especially those created previously by the MCP server, noting that sf_deploy_metadata does not support destructiveChanges. It also explains dependency-order prerequisites for certain types, giving practical usage guidance. It does not explicitly enumerate exclusions, but the alternatives are implied by the contrast with sf_deploy_metadata and sibling data-deletion tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/semwalajay83-sem/salesforce-metadata-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server