Skip to main content
Glama
tsmztech

Salesforce MCP Server

by tsmztech

salesforce_read_apex_trigger

Read-only

Read Apex triggers from Salesforce by name or pattern. Get full trigger body for a specific trigger, list matching triggers, and optionally include metadata like API version and last modified date.

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
namePatternNoPattern to match Apex trigger names (supports wildcards * and ?)
triggerNameNoName of a specific Apex trigger to read
includeMetadataNoWhether to include metadata about the Apex triggers
Behavior4/5

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

With readOnlyHint=true already providing safety, the description adds valuable behavioral detail: that triggerName returns the full body, namePattern returns only names, includeMetadata toggles metadata, and wildcards are supported. This goes beyond what annotations disclose and helps the agent predict the output for different input combinations.

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 one-sentence purpose, four clear examples, and a bulleted list of notes. Every sentence serves the goal of explaining the tool's behavior, and the length is appropriate for the tool's complexity. It front-loads the main verb and resource.

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?

Given the absence of an output schema, the description adequately explains what the tool returns for each input scenario. It covers all three parameters and their combinations, which is sufficient for a read-only tool. It could mention error handling or permission requirements, but these are not critical for basic usage.

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?

The schema already describes each parameter (100% coverage), but the description enriches their meaning by explaining the consequences of using them together, such as the fallback when neither triggerName nor namePattern is provided and the effect of includeMetadata. This extra explanation 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 begins with 'Read Apex triggers from Salesforce', which is a specific verb+resource statement. The examples and notes clarify the exact scope (Apex triggers, not classes or other objects) and the behavior, distinguishing it from sibling tools like salesforce_read_apex (for classes) and salesforce_write_apex_trigger (for writing triggers).

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 vs namePattern vs includeMetadata, including the fallback behavior when neither is provided. It does not explicitly name alternative tools, but the purpose statement itself is sufficient to imply this is the tool for reading triggers rather than other Salesforce objects.

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

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