Skip to main content
Glama
advancedcommunities

Salesforce MCP Server

bulk_upsert_records

DestructiveIdempotent

Insert or update many records with the Bulk API 2.0, matching existing records on an external ID field. Each record (or CSV row) must include the externalIdField value; do not include Id.

Instructions

Insert or update many records with the Bulk API 2.0, matching existing records on an external ID field. Each record (or CSV row) must include the externalIdField value; do not include Id. Provide exactly one of 'records', 'csvPath' or 'csvContent'. Upserts above 500 rows ask the user to confirm when the client supports confirmation. Returns the jobId, state, processed and failed counts, and sample failures when the job finishes within 'wait' seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.8.0

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the annotations, it discloses the 500-row confirmation prompt, the async job lifecycle (jobId/state while running), the wait window behavior, and the return contents (processed/failed counts and sample failures). It adds the non-obvious constraint 'do not include Id', which no structured field states.

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?

A single front-loaded paragraph that leads with the operation and matching rule before diving into input modes and return behavior. It is dense but every clause is informative, so little can be cut without losing operational detail.

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 complex, nested, multi-mode bulk tool with no output schema, the description covers operation, matching, input formats, exclusivity, confirmation, wait behavior, and return shape. It omits only minor context such as org/auth selection, which the schema already carries via targetOrg.

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 nested schema descriptions are themselves very rich, but the description still adds unique meaning: every record/CSV row must carry the externalIdField value and must omit Id, and the three input modes are mutually exclusive. That reinforces and extends what the schema encodes.

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 states a precise verb pair (insert or update = upsert), the resource (many records), the mechanism (Bulk API 2.0), and the matching semantics (external ID field). This distinguishes it cleanly from siblings bulk_insert_records and bulk_update_records without opening their schemas.

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?

It gives clear operational context: provide exactly one of records/csvPath/csvContent, depend on wait, and route to bulk_job_status if the job is still running. It does not explicitly state when to prefer this over bulk_insert_records/bulk_update_records, leaving that distinction to be inferred from the upsert semantics.

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