salesforce_read_apex
Retrieve Apex class code and metadata from Salesforce. Read specific classes by name, list classes matching patterns, or get detailed metadata for development and analysis.
Instructions
Read Apex classes from Salesforce.
Examples:
Read a specific Apex class by name: { "className": "AccountController" }
List all Apex classes with an optional name pattern: { "namePattern": "Controller" }
Get metadata about Apex classes: { "includeMetadata": true, "namePattern": "Trigger" }
Use wildcards in name patterns: { "namePattern": "AccountCont" }
Notes:
When className is provided, the full body of that specific class is returned
When namePattern is provided, all matching class names are returned (without body)
Use includeMetadata to get additional information like API version, length, and last modified date
If neither className nor namePattern is provided, all Apex class names will be listed
Wildcards are supported in namePattern: * (matches any characters) and ? (matches a single character)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| className | No | Name of a specific Apex class to read | |
| namePattern | No | Pattern to match Apex class names (supports wildcards * and ?) | |
| includeMetadata | No | Whether to include metadata about the Apex classes |