salesforce_execute_apex
Run anonymous Apex code against a Salesforce org in system context, use System.debug() to inspect results, and return the debug log output.
Instructions
Execute anonymous Apex code on the Salesforce org. The code runs in a system context. Use System.debug() to output results. Returns the debug log output.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code": "<code>"
},
"name": "salesforce_execute_apex"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The anonymous Apex code to execute. Use System.debug() to output data you want to inspect. |