salesforce_read_apex_trigger
Read Apex triggers from Salesforce by name to get trigger body, or list matching triggers using name patterns with metadata and pagination.
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 | |
| limit | No | Maximum number of triggers to return when listing (default 50) | |
| offset | No | Number of triggers to skip for pagination when listing (default 0) |