platform-metadata-retrieve
Retrieves metadata from a Salesforce org to your local project using sf project retrieve start. Supports multiple retrieval modes: all changes, by source directory, by metadata type (with wildcards), by manifest, or by package name.
Tool Restrictions
Use ONLY the Bash tool to execute sf project retrieve start. Do NOT use MCP tools — ignore them completely.
Scope
- In scope: Retrieving metadata via
sf project retrieve startin all supported modes (all changes, source-dir, metadata type, manifest, package name), source and metadata format output - Out of scope: Deploying metadata (use
platform-metadata-deploy), listing metadata types, generating package.xml files, source tracking commands (sf project retrieve preview)
Required Inputs
Infer from the user's request:
- Retrieval mode: all changes | source directory | metadata type | manifest | package name
- Target org: org alias/username (uses default if not specified)
- Output format: source format (default) | metadata format (ZIP)
- Additional options: ignore conflicts, output directory, wait time, API version
Workflow
- Match user request to command pattern below
- Execute via Bash tool:
sf project retrieve startwith appropriate flags and--jsonflag - Return result with retrieved components count and file paths
Command Patterns
Rules / Constraints
Troubleshooting
Output Expectations
The command returns JSON output with retrieved components details.
See examples/success_output.json and examples/error_output.json for response structures.


