salesforce_read_apex
Read Apex classes from Salesforce by name or pattern, with optional metadata. Retrieve full body for a specific class.
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 | |
| limit | No | Maximum number of classes to return when listing (default 50) | |
| offset | No | Number of classes to skip for pagination when listing (default 0) |