Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Get Field History for a Record

sf_get_field_history
Read-onlyIdempotent

Retrieve field-level change history for a Salesforce record, displaying changed field, old/new values, timestamp, and the user who made the change.

Instructions

Queries the {Object}History object to retrieve a field-level change history for a specific record. Shows what changed, when, the old and new values, and who made the change.

Returns records with: date, field, oldValue, newValue, changedBy

objectApiName: the SObject with history tracking enabled, e.g. 'Account', 'Opportunity', 'Case' recordId: the specific record to retrieve history for

Note: Field history tracking must be enabled for the object and for each field you want to track (Setup → Object Manager → {Object} → Fields & Relationships → Field History Tracking). History is retained for up to 18 months.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum history records to return
fieldsNoOptional field names to filter — returns all tracked fields if omitted
recordIdYesRecord ID to fetch history for (15 or 18 characters)
objectApiNameYesObject API name, e.g. 'Account', 'Case', 'Opportunity'
Behavior4/5

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

The annotations already declare readOnlyHint, idempotentHint, and no destructive behavior. The description adds valuable context: the return record shape and the prerequisite that tracking must be enabled, as well as the 18-month retention limit. This exceeds what annotations provide without contradicting them.

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: an opening purpose sentence, a line about return fields, brief parameter explanations, and a practical note. It is not overly verbose, though the parameter section repeats some schema info. Each section contributes useful information.

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?

For a read-only query tool with 4 parameters and no output schema, the description covers the purpose, return values, and prerequisites. It does not mention ordering, pagination, or error scenarios, but given the strong annotations and schema, this is a reasonably complete description.

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 input schema already provides 100% coverage of all four parameters with descriptions. The description adds extra meaning by clarifying that objectApiName must be an object with history tracking enabled and that recordId is the specific record. It does not deeply elaborate on 'limit' or 'fields' beyond the schema, but the baseline is raised slightly due to the additional context.

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 it 'Queries the {Object}History object to retrieve a field-level change history for a specific record' and lists the exact data returned (date, field, oldValue, newValue, changedBy). This distinguishes it from sibling tools like sf_query_records or sf_get_record.

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 context for when to use this tool (field-level change history for a specific record) and includes important prerequisites (field history tracking must be enabled, 18-month retention). It does not explicitly name alternative tools or exclusion scenarios, 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