Skip to main content
Glama

Get a Salesforce record

sf_get_record

Retrieve a single Salesforce record by its ID, optionally selecting only the fields you need to reduce response size. Works with standard and custom objects.

Instructions

Fetch a single record by Id (GET /sobjects/{SObject}/{id}). Optionally restrict the returned fields with fields to keep the response small.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe 15- or 18-character Salesforce record Id.
fieldsNoOnly return these field names, e.g. ["Id", "Name"]. Omit for all fields.
sobjectYesAPI name of the sObject, e.g. "Account", "Contact", or "My_Object__c".
toolingNoRead via the Tooling API instead. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the behavioral burden, and 'Fetch' plus 'GET /sobjects/{SObject}/{id}' makes the read-only nature clear. The fields option also signals response-size control. It does not mention not-found behavior or auth requirements, but for a straightforward GET-by-Id operation the core behavior is transparent.

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?

Two short sentences contain the endpoint, the primary use, and the optional field restriction. The most decision-relevant information is front-loaded and every phrase earns its place.

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 simple get-by-Id operation with a fully described schema, the description gives enough to invoke the tool and predict its basic behavior. Since there is no output schema, a brief note on the return shape would fully complete the picture, but 'fetch a record' largely covers it.

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?

Schema coverage is 100%: every parameter already has a meaningful description, so the schema carries the semantic weight. The description adds only the rationale that restricting fields keeps the response small, which is useful but not essential.

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 uses a specific verb ('Fetch') and resource ('single record by Id'), and also gives the exact REST endpoint pattern. This clearly distinguishes it from siblings like sf_soql_query, sf_create_record, and sf_update_record, which have different targets and verbs.

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?

'Fetch a single record by Id' provides clear invocation context: use this when you already have a record Id and need one object. It does not explicitly name query or rest_request as alternatives, which keeps it just below a 5.

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