Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Get Setup Audit Trail

sf_get_setup_audit_trail
Read-onlyIdempotent

Identify who changed Salesforce configuration settings and when by querying the Setup Audit Trail. Filter by section, user, or date range for security audits and compliance reporting.

Instructions

Queries the SetupAuditTrail object to see who made what configuration changes to the org, and when. Covers the last 6 months of setup activity.

Returns records with: date, username, section, action, display (human-readable description)

section filter examples: 'Custom Fields', 'Profiles', 'Flows', 'Apex Classes', 'Permission Sets', 'Connected Apps', 'Users'

Useful for:

  • Security audits (who changed profiles or permissions)

  • Debugging unexpected configuration changes

  • Compliance reporting on org configuration changes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum records to return
endDateNoEnd date in ISO format, e.g. '2025-12-31'
sectionNoFilter by section, e.g. 'Custom Fields', 'Profiles', 'Flows', 'Apex Classes'
startDateNoStart date in ISO format, e.g. '2025-01-01'
createdByUsernameNoFilter by the username who made the change
Behavior4/5

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

Annotations already indicate readOnly, idempotent, and non-destructive behavior. The description adds valuable context beyond this: it specifies the 6-month data window, the fields returned (date, username, section, action, display), and example section filters. It does not contradict annotations and provides practical behavioral details, but it omits details like pagination or access requirements, so a 4 is appropriate.

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 concise and well-structured: a clear opening sentence, a short list of return fields, section filter examples, and bulleted use cases. Every sentence contributes useful information without fluff or redundancy.

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 this is a query tool with no output schema, the description adequately covers the return fields, use cases, and the 6-month limit. It does not mention pagination or error handling, but those are not critical for a read-only query tool with a limit parameter. Overall, it provides enough context for an agent to use the tool effectively.

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

Parameters3/5

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

The input schema has 100% parameter coverage with descriptions for all five parameters. The description adds some extra meaning by giving section filter examples and mentioning the 6-month window, which contextualizes startDate/endDate. However, the schema already carries the main semantic load, so this is a baseline 3 with minimal added value.

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 tool 'Queries the SetupAuditTrail object to see who made what configuration changes to the org, and when.' This includes a specific verb (queries), a resource (SetupAuditTrail object), and the purpose (track configuration changes). It also provides concrete use cases and distinguishes itself from other audit-related tools by focusing on setup audit trail data.

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 usage context through 'Useful for:' bullets (security audits, debugging configuration changes, compliance reporting). It also mentions the 6-month coverage window, implying when this tool is appropriate. However, it does not explicitly name alternative tools or state when not to use it, so it falls short of a 5.

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/semwalajay83-sem/salesforce-metadata-mcp'

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