Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Metadata Impact Analysis

sf_get_metadata_dependencies
Read-onlyIdempotent

Find all Salesforce metadata that references a target component, so you can see what breaks before changing or deleting it.

Instructions

Answers "what breaks if I change this?" for any metadata component. Read-only — it changes nothing.

Returns every component that REFERENCES the target (Apex classes, triggers, flows, validation rules, layouts, report types, formulas), grouped by type. For custom fields it also reports how many records currently hold a value, which is usually the deciding factor in whether a change is safe.

componentType + componentName: e.g. CustomField + 'Account.Revenue__c', or ApexClass + 'AccountService' componentId: alternatively pass the Salesforce Id directly (needed for types outside the supported list) includeUses: also return what the component itself depends on

Run this BEFORE deleting or reshaping anything that holds data. Note the blindSpots list returned with every response: this API cannot see dynamic SOQL, string-built field names, managed-package internals, or external integrations, so an empty result means "nothing found", never "safe to change".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentIdNoSalesforce Id of the component, as an alternative to type+name (required for types not in the supported list).
includeUsesNoAlso return what this component itself depends on (the reverse direction).
componentNameNoComponent API name. For CustomField use 'Object.Field__c', e.g. 'Account.Revenue__c'.
componentTypeNoMetadata type: CustomField, CustomObject, ApexClass, ApexTrigger, Flow, ValidationRule, Layout, PermissionSet, LightningComponentBundle, AuraDefinitionBundle, StaticResource, ApexPage, ApexComponent

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.0.0

TDQS

A4.7/5.0
Behavior5/5

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

Adds substantial behavior beyond the annotations: results grouped by type, custom-field record counts as the safety deciding factor, and the critical blindSpots caveat that an empty result means 'nothing found,' never 'safe to change.' The read-only sentence reinforces readOnlyHint=true rather than merely repeating it, and nothing contradicts the annotation set.

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?

The core purpose is front-loaded in the first sentence, and each subsequent segment (return behavior, param routing, when-to-run, blind spots) adds unique value. It is longer than average, but every sentence earns its place, and paragraph breaks keep it scannable rather than wall-of-text.

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?

With no output schema present, the description carries the full burden of return semantics and covers it: referenced components grouped by type, custom-field record counts, and the blindSpots list. Nothing an agent needs to invoke it correctly or interpret results safely is missing, including the dual invocation modes derived from the param set.

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 earns the extra point by spelling out the two mutually-exclusive invocation patterns with worked examples (CustomField + 'Account.Revenue__c', ApexClass + 'AccountService') and clarifying when componentId is the correct path. This relationship between parameters is not visible from reading the schema properties in isolation.

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?

Opens with a concrete, question-scoped statement — 'Answers what breaks if I change this?' — then names the resource ('any metadata component') with precise referential semantics. It is plainly distinct from the sibling create/deploy/retrieve/query tools, so an agent can select it correctly without opening the schema.

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 explicit when-to-use guidance: 'Run this BEFORE deleting or reshaping anything that holds data.' It lacks an explicit when-not-to-use clause or a named alternative, but no sibling competes for this impact-analysis job, so an exclusion statement would be redundant. The guidance is actionable and tied to a concrete workflow moment.

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