Skip to main content
Glama

Salesforce MCP Server

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:

  1. Read a specific Apex class by name: { "className": "AccountController" }
  2. List all Apex classes with an optional name pattern: { "namePattern": "Controller" }
  3. Get metadata about Apex classes: { "includeMetadata": true, "namePattern": "Trigger" }
  4. 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

NameRequiredDescriptionDefault
classNameNoName of a specific Apex class to read
includeMetadataNoWhether to include metadata about the Apex classes
namePatternNoPattern to match Apex class names (supports wildcards * and ?)

Input Schema (JSON Schema)

{ "properties": { "className": { "description": "Name of a specific Apex class to read", "type": "string" }, "includeMetadata": { "description": "Whether to include metadata about the Apex classes", "type": "boolean" }, "namePattern": { "description": "Pattern to match Apex class names (supports wildcards * and ?)", "type": "string" } }, "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/tsmztech/mcp-server-salesforce'

If you have feedback or need assistance with the MCP directory API, please join our Discord server