Deploy Metadata
sf_deploy_metadataDeploy selected Salesforce metadata components to an org by building a deployment package, with options for validate-only checks, running tests, and rollback on errors.
Instructions
Deploys a set of metadata components directly to the org using the Metadata API SOAP deploy operation. Builds a package.xml and deployment zip in memory. Supports validate-only (checkOnly:true) for pre-deployment validation without making changes. Specify runTests to execute test classes during deployment (required for production). Polls until complete or timeout.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "sf_deploy_metadata"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runTests | No | Test classes to run during deployment | |
| checkOnly | No | Validate only, do not actually deploy | |
| testLevel | No | Test level: NoTestRun, RunSpecifiedTests, RunLocalTests, or RunAllTestsInOrg | |
| components | No | Metadata components to include in the deployment package. These reference components already in the org. Can be empty when using componentsXml to deploy new/updated components with inline XML. | |
| waitMinutes | No | Max minutes to wait for deploy to complete | |
| componentsXml | No | Optional inline XML components to deploy. Each entry provides the complete XML definition (type, name, xml). The file path is inferred from type/name. When provided alongside components, both are deployed together. | |
| rollbackOnError | No | Roll back all changes if any component fails |