Skip to main content
Glama
ampcome-mcps

MCP Salesforce Connector

by ampcome-mcps

get_record

Retrieve specific Salesforce records by object name and ID to access customer data, account information, or other stored details within the CRM system.

Instructions

Retrieves a specific record by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
object_nameYesThe name of the Salesforce object (e.g., 'Account', 'Contact')
record_idYesThe ID of the record to retrieve

Implementation Reference

  • Handler implementation for the 'get_record' tool: extracts object_name and record_id from arguments, retrieves the Salesforce object, fetches the record using simple-salesforce library, and returns the record data as JSON.
    elif name == "get_record":
        object_name = arguments.get("object_name")
        record_id = arguments.get("record_id")
        if not object_name or not record_id:
            raise ValueError("Missing 'object_name' or 'record_id' argument")
        if not sf_client.sf:
            raise ValueError("Salesforce connection not established.")
        sf_object = getattr(sf_client.sf, object_name)
        results = sf_object.get(record_id)
        return [
            types.TextContent(
                type="text",
                text=f"{object_name} Record (JSON):\n{json.dumps(results, indent=2)}",
            )
        ]
  • Tool registration for 'get_record' including name, description, and input schema definition within the @server.list_tools() handler.
    types.Tool(
        name="get_record",
        description="Retrieves a specific record by ID",
        inputSchema={
            "type": "object",
            "properties": {
                "object_name": {
                    "type": "string",
                    "description": "The name of the Salesforce object (e.g., 'Account', 'Contact')",
                },
                "record_id": {
                    "type": "string",
                    "description": "The ID of the record to retrieve",
                },
            },
            "required": ["object_name", "record_id"],
        },
    ),
  • JSON schema for 'get_record' tool input: requires object_name and record_id as strings.
    inputSchema={
        "type": "object",
        "properties": {
            "object_name": {
                "type": "string",
                "description": "The name of the Salesforce object (e.g., 'Account', 'Contact')",
            },
            "record_id": {
                "type": "string",
                "description": "The ID of the record to retrieve",
            },
        },
        "required": ["object_name", "record_id"],
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'retrieves' implies a read-only operation, the description doesn't address important behavioral aspects like authentication requirements, error handling for invalid IDs, rate limits, or what format the record is returned in. This leaves significant gaps for a tool that interacts with a database system.

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 extremely concise at just 5 words, front-loading the essential information with zero wasted words. Every word earns its place, making it easy for an agent to quickly understand the core function.

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

Completeness2/5

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

For a database retrieval tool with no annotations and no output schema, the description is insufficiently complete. It doesn't explain what format the record is returned in, whether it includes all fields or just specific ones, how to handle different Salesforce object types, or what happens when a record doesn't exist. Given the complexity of Salesforce data retrieval and the lack of structured metadata, more context is needed.

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 description coverage is 100%, so the schema already fully documents both parameters. The description adds no additional parameter information beyond what's in the schema - it doesn't explain the relationship between object_name and record_id, provide examples, or clarify constraints. This meets the baseline for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('retrieves') and resource ('a specific record by ID'), making the purpose immediately understandable. However, it doesn't differentiate this tool from similar siblings like 'get_object_fields' or 'run_soql_query', which could also retrieve records in different ways.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'run_soql_query' for complex queries and 'get_object_fields' for metadata, the agent receives no help in selecting the right tool for retrieving a single record by ID versus other retrieval methods.

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/ampcome-mcps/salesforce-mcp'

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