Skip to main content
Glama
semwalajay83-sem

salesforce-metadata-mcp

Upsert SObject Record

sf_upsert_record
Idempotent

Create or update Salesforce records using an External ID for matching, inserting new records when no match exists and updating when it does.

Instructions

Creates or updates a Salesforce record using an External ID field for matching. If a record with the given external ID value exists, it is updated; otherwise a new record is created.

objectApiName: the SObject API name (e.g. 'Account', 'Contact') externalIdField: the External ID field API name used for matching (e.g. 'Legacy_Id__c') externalIdValue: the value to match on fields: the field values to set on the record

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsYesField key-value pairs to set/update
objectApiNameYesSObject API name, e.g. 'Account'
externalIdFieldYesExternal ID field API name, e.g. 'My_External_Id__c'
externalIdValueYesValue of the external ID to match on
Behavior4/5

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

Annotations indicate a non-read-only, idempotent, non-destructive write. The description adds the key matching semantics—'If a record with the given external ID value exists, it is updated; otherwise a new record is created.' This goes beyond annotations but omits edge cases like duplicate external IDs or permission requirements.

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 compact—a one-sentence overview followed by a short parameter list with examples. It front-loads the primary behavior and avoids unnecessary detail, though the parameter list overlaps with schema information.

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

Completeness3/5

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

The description covers the core upsert logic and parameter meanings, but it fails to mention return values (no output schema), error conditions (e.g., non-unique external ID), or preconditions such as required permissions. These gaps make it insufficient for an agent to fully anticipate tool behavior.

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?

All four parameters are described in the schema (100% coverage). The description repeats these with minor example additions (e.g., 'Account', 'Legacy_Id__c'), but this doesn't materially enhance understanding beyond the schema, so it earns the baseline 3.

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 explicitly states the tool 'Creates or updates a Salesforce record using an External ID field for matching,' which is a clear verb+resource+mechanism. It also explains the create-or-update logic, distinguishing it from sibling tools like sf_create_record and sf_update_record by the external ID matching behavior.

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 implies the tool is for scenarios where you want to upsert based on an external ID, but it does not explicitly mention alternatives or conditions to avoid using it. The context is clear but lacks explicit exclusions, scoring a 4.

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