MCP server enabling AI assistants to interact with Salesforce orgs through the Salesforce CLI
The Salesforce MCP server demonstrates solid foundational quality with clear naming conventions, comprehensive descriptions, and properly typed parameters. All 11 tools follow consistent verb-noun naming (execute_anonymous_apex, run_apex_tests, get_test_results, etc.). Descriptions are substantive (average ~150-200 chars) and explain both WHAT the tool does and WHEN to use it. Input schemas are fully specified with types and descriptions on all parameters. However, there are meaningful gaps in output schema documentation, error handling guidance, and parameter relationship documentation. The server lacks explicit confirmation patterns for destructive operations and does not guide LLM recovery from common failure modes.
Execute Apex code in a Salesforce Org. This command allows you to run Apex code directly against a specified Salesforce Org. The code is executed in the context of the Org, and the results are returned in JSON format. You can use this command to test Apex code snippets, run batch jobs, or perform other Apex-related tasks. You can review the debug logs of the execution to see the results of the code execution.
Generate a new Apex class file from a template. Creates a new Apex class with the specified name in the project structure.
Generate a new Apex trigger file from a template. Creates a new Apex trigger for the specified SObject.
Retrieve a specific Apex debug log or the most recent logs. Returns the debug log content for analysis and troubleshooting.
Get code coverage metrics for an Apex class or organization. Can retrieve organization-wide coverage or coverage from a specific test run.
Get current server permission settings
Output schemas not documented in tool definitions. LLMs cannot predict what fields will be returned (e.g., run_apex_tests returns test results with pass/fail/coverage, but structure is not specified in the tool definition)
Destructive write operations (execute_anonymous_apex, run_apex_tests with side effects, generate_apex_*) lack explicit confirmation patterns. Agents should confirm before executing irreversible code in a live org
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 58 | <=2025-11-25 | v2 |
| 2026-03-09 | C | 60 | - | v1 |
Get the results of an asynchronous Apex test run. Returns detailed test outcomes, error messages, and code coverage information for a specified test run ID.
List all Apex debug logs in a Salesforce Org. Displays available debug logs with timestamps and IDs.
List available code analysis rules with details. Use to determine rules for code-analyzer run command.
Run Apex unit tests in a Salesforce Org. This command allows you to run Apex tests synchronously or asynchronously. You can run all tests, specific test classes, or specific test methods. The command returns test results including pass/fail counts, code coverage metrics, and detailed test outcomes.
Analyze code for quality and security issues. Run list_code_analyzer_rules first to select appropriate rules for ruleSelector parameter.
Error handling does not guide LLM recovery. For example, execute_anonymous_apex may fail with Apex compilation errors, authentication errors, or org permission issues, but tool descriptions provide no guidance on what to do next or which tool to call for remediation
Parameter relationships not documented. For example, get_code_coverage type='from-tests' requires testRunId, but this dependency is only lightly implied in the description, not explicitly stated as a mutual constraint
List tools (list_apex_logs, list_code_analyzer_rules) do not specify pagination parameters (limit, offset, page_size) or document result limits. Returning unbounded lists risks context window exhaustion
Descriptions for get_apex_log and list_apex_logs are generic ('Displays available debug logs with timestamps and IDs'). They do not explain what debug logs contain, why an LLM would need them, or how to interpret them for troubleshooting