Skip to main content
Glama
aaron-pienza

Salesforce MCP Server

by aaron-pienza

salesforce_read_apex_trigger

Read Apex triggers from Salesforce by name to get trigger body, or list matching triggers using name patterns with metadata and pagination.

Instructions

Read Apex triggers from Salesforce.

Examples:

  1. Read a specific Apex trigger by name: { "triggerName": "AccountTrigger" }

  2. List all Apex triggers with an optional name pattern: { "namePattern": "Account" }

  3. Get metadata about Apex triggers: { "includeMetadata": true, "namePattern": "Contact" }

  4. Use wildcards in name patterns: { "namePattern": "Account*" }

Notes:

  • When triggerName is provided, the full body of that specific trigger is returned

  • When namePattern is provided, all matching trigger names are returned (without body)

  • Use includeMetadata to get additional information like API version, object type, and last modified date

  • If neither triggerName nor namePattern is provided, all Apex trigger names will be listed

  • Wildcards are supported in namePattern: * (matches any characters) and ? (matches a single character)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
triggerNameNoName of a specific Apex trigger to read
namePatternNoPattern to match Apex trigger names (supports wildcards * and ?)
includeMetadataNoWhether to include metadata about the Apex triggers
limitNoMaximum number of triggers to return when listing (default 50)
offsetNoNumber of triggers to skip for pagination when listing (default 0)
Behavior4/5

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

No annotations are provided, so the description carries full burden. It discloses key behaviors: triggerName returns the full body, namePattern returns names without body, wildcard support, includeMetadata effect, and default behavior when no parameters are given. It does not cover rate limits or authentication, but these are implicit in Salesforce API context. The description adds value beyond the input schema.

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

Conciseness4/5

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

The description is well-structured with separate sections for examples and notes. It is somewhat lengthy but every part adds value. Could be slightly more concise, but the clarity from examples justifies the length.

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?

Although there is no output schema, the description clarifies return formats (full body vs. names, metadata inclusion). It also mentions limit and offset for pagination, though not in detail. Error handling is not covered, but for this tool, the description is sufficiently complete to guide an agent.

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?

Schema coverage is 100%, and the description adds significant meaning: it explains the difference between triggerName (returns full body) and namePattern (returns names only), wildcard usage, and the effect of includeMetadata. Examples also illustrate usage patterns. This goes well beyond the schema descriptions.

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 clearly states the verb 'Read' and resource 'Apex triggers from Salesforce'. It distinguishes from sibling tools like salesforce_read_apex (read Apex classes) and salesforce_write_apex_trigger (write triggers) by focusing on triggers and read-only operation. Examples further clarify the scope.

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 description provides clear guidance on when to use triggerName (specific trigger with full body), namePattern (listing with pattern), or neither (list all). It explains the outcomes for each scenario, but does not explicitly state when not to use this tool or mention alternatives like SOQL queries. Still, the usage context is well-defined.

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

Install Server

Other Tools

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/aaron-pienza/mcp-server-salesforce'

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