Skip to main content
Glama
boejucci

Salesforce MCP Server (Extended)

by boejucci

salesforce_read_apex_trigger

Retrieve and list Apex triggers from Salesforce. Specify a trigger name to get its body, or use a name pattern with wildcards to find matching triggers and optionally include metadata.

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.5

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, but the description carries the full burden effectively. It discloses exactly what is returned for each parameter combination: full body for triggerName, names only for namePattern, metadata flag, and behavior when neither is provided. Wildcard semantics are also spelled out, giving complete behavioral transparency.

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 an overview, four illustrative examples, and a list of notes. Every section contributes meaningful information without fluff. It's appropriately sized for a tool with 3 parameters and no output schema, and information is front-loaded with the core purpose.

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

Completeness5/5

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

Even without an output schema, the description explains what the tool returns in every scenario, including specific trigger bodies, matching names, and metadata fields. It also covers wildcard support and default behavior, making it comprehensive for a read-only tool.

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

Parameters4/5

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

Schema coverage is 100% with clear descriptions for each parameter. The description adds value beyond the schema by clarifying interactions (e.g., triggerName takes precedence, namePattern returns names only) and providing concrete examples of wildcard usage. This enhances parameter semantics without being redundant.

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 'Read Apex triggers from Salesforce,' using a specific verb and resource. It clearly differentiates from siblings like salesforce_read_apex (likely Apex classes) and salesforce_write_apex_trigger (write operation). The detailed examples reinforce the purpose.

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 gives comprehensive examples for when to use triggerName vs namePattern vs neither, with notes on wildcards and metadata. However, it lacks explicit comparison to alternative tools (e.g., 'use salesforce_read_apex for classes'), so it falls short of full 5.

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