salesforce_read_apex
Retrieve Apex classes from Salesforce by class name or pattern, including metadata and support for wildcards, to manage and analyze code efficiently.
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 | |
includeMetadata | No | Whether to include metadata about the Apex classes | |
namePattern | No | Pattern to match Apex class names (supports wildcards * and ?) |