salesforce_read_apex_trigger
Retrieve Apex trigger code and metadata from Salesforce. Read a specific trigger by name, list triggers matching a pattern, or get details like API version and last modified date.
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 |
|---|---|---|---|
| namePattern | No | Pattern to match Apex trigger names (supports wildcards * and ?) | |
| triggerName | No | Name of a specific Apex trigger to read | |
| includeMetadata | No | Whether to include metadata about the Apex triggers |