Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Retrieve Metadata

sf_retrieve_metadata
Read-onlyIdempotent

Retrieve Salesforce metadata components and return their actual file contents to back up configuration, review existing setup, and verify what is truly deployed before making changes.

Instructions

Retrieves metadata components from the org and returns their actual file contents. Use this to read existing configuration before making changes, to back up metadata, or to check what is really deployed rather than what you think is deployed. Waits for the async retrieve to finish and unpacks the resulting zip, returning each file's path and source. Large files are truncated. Accepts 'components' (array), or 'metadataType'+'componentName' as a single-item shortcut, or a raw 'packageXml' document — provide exactly one form.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentsNoMetadata components to retrieve
packageXmlNoRaw package.xml content for selective retrieve. If provided, components list is ignored.
metadataTypeNoSingle metadata type (alternative to components array)
componentNameNoSingle component name (used with metadataType)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.8.5

TDQS

A4.7/5.0
Behavior5/5

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

The description reveals significant runtime behavior beyond annotations: it 'waits for the async retrieve to finish,' 'unpacks the resulting zip,' returns 'each file's path and source,' truncates large files, and requires exactly one parameter form. None of these details are present in the annotations, so they add real value. There is no contradiction with the readOnly/idempotent hints.

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 description packs purpose, usage scenarios, async behavior, return format, truncation, and parameter-form constraints into four sentences with no filler. Information is front-loaded with the core action, and every sentence earns its place.

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 there is no output schema, the description adequately covers invocation forms, async behavior, return shape, and the truncation edge case. It does not mention error conditions or permission requirements, but the annotations already cover the safety profile for a read-only, non-destructive tool, so the missing details are minor.

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

Parameters5/5

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

Although the schema already describes each parameter, the description adds crucial relational semantics: the equivalence of 'metadataType'+'componentName' as a shortcut, the packageXml alternative that overrides components, and the 'exactly one form' constraint. These usage rules are not evident from the schema alone and prevent invalid calls.

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 states a specific verb and resource: 'Retrieves metadata components from the org and returns their actual file contents.' It also distinguishes itself from sibling create/deploy tools by emphasizing 'actual file contents' and checking 'what is really deployed rather than what you think is deployed.' This makes the tool's role clear without needing to open any 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?

The description explicitly lists use cases: read existing configuration before making changes, back up metadata, or verify actual deployed state. It does not explicitly name alternative tools or state when-not-to-use, but the contrast with create/deploy siblings and the read-only framing make the appropriate context clear.

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