salesforce_read_apex_trigger
Retrieve and list Apex triggers from Salesforce. Specify a trigger name to get its body, or use a name pattern with wildcards to find matching triggers and optionally include metadata.
Instructions
Read Apex triggers from Salesforce.
Examples:
Read a specific Apex trigger by name: { "triggerName": "AccountTrigger" }
List all Apex triggers with an optional name pattern: { "namePattern": "Account" }
Get metadata about Apex triggers: { "includeMetadata": true, "namePattern": "Contact" }
Use wildcards in name patterns: { "namePattern": "Account*" }
Notes:
When triggerName is provided, the full body of that specific trigger is returned
When namePattern is provided, all matching trigger names are returned (without body)
Use includeMetadata to get additional information like API version, object type, and last modified date
If neither triggerName nor namePattern is provided, all Apex trigger names will be listed
Wildcards are supported in namePattern: * (matches any characters) and ? (matches a single character)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| triggerName | No | Name of a specific Apex trigger to read | |
| namePattern | No | Pattern to match Apex trigger names (supports wildcards * and ?) | |
| includeMetadata | No | Whether to include metadata about the Apex triggers |