Skip to main content
Glama
julianboudara-code

mcp-server-salesforce

salesforce_read_apex

Read-only

Reads Apex classes from Salesforce. Fetch a specific class by name, list classes matching a pattern, or include metadata like API version.

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

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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.0.7

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations only declare readOnlyHint=true. The description adds substantial behavioral detail: namePattern results exclude class bodies, includeMetadata adds API version/length/last modified date, wildcard syntax is supported, and the no-argument behavior lists all class names. This goes well beyond what the annotation provides.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear summary, four relevant examples, and grouped notes. Information is front-loaded and each line contributes to understanding parameter behavior. Despite its length, it remains focused and easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers all main input modes, wildcard behavior, metadata enrichment, and the default listing case. The only notable ambiguity is what happens when both className and namePattern are provided together, and whether includeMetadata also applies to exact className lookups. Overall it is highly complete for a read-only tool with no output schema.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already describes all three parameters, but the description adds meaningful semantics: how className and namePattern behave differently, how includeMetadata changes the result, default behavior when neither is provided, and concrete wildcard syntax with examples. This adds clear value beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Read Apex classes from Salesforce.' This clearly distinguishes the tool from siblings like salesforce_write_apex and salesforce_read_apex_trigger, which target different operations or resources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The notes give explicit usage conditions: className returns a full body, namePattern returns matching class names without bodies, includeMetadata adds metadata, and neither parameter lists all classes. It does not explicitly name alternatives or state when not to use this tool, but the usage context is clearly conveyed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Latest Blog Posts

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/julianboudara-code/mcp-server-salesforce'

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