Skip to main content
Glama

odata_upsert_rows

DestructiveIdempotent

Idempotent import of rows into any entity via OData: PATCH when the record exists (matched by keyFields), otherwise POST. Safe to re-run -- duplicates are updated, not re-created. Best for small-to-medium transactional loads (e.g. <= a few thousand rows). For bulk loads use dmf_import_file. Provide rows as a JSON array of objects; resolve key fields from the KB (get_data_entity_info) -- do not guess them.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsJsonYesJSON array of row objects, e.g. [{"CustomerAccount":"C0001","Name":"Acme"}].
entitySetYesOData public entity set name, e.g. 'CustomersV3'.
keyFieldsYesComma-separated business key fields used to detect existing records, e.g. 'CustomerAccount' or 'dataAreaId,ItemNumber'.
legalEntityNoOptional legal entity (dataAreaId) injected into each row when absent.
crossCompanyNoSet true to allow cross-company writes.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.7/5.0
Behavior4/5

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

The description explains the PATCH/POST upsert semantics, that duplicates are updated rather than re-created, and that re-running is safe. This goes beyond the annotations' idempotentHint and destructiveHint by clarifying exactly what modification will occur. It does not disclose potential indirect effects of cross-company writes, but the most important behavioral traits are covered.

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?

Three sentences carry the core semantics, usage scope, alternative tool, and a critical usage instruction. The most important fact, idempotent upsert behavior, is front-loaded, and nothing extraneous is included. Every sentence earns its place.

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

Completeness5/5

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

For a tool with five parameters, full schema documentation, and no output schema, the description covers the key behavioral contract, idempotency, size limits, alternative routing, and key-field resolution guidance. There is no missing information an agent would need to invoke this tool correctly.

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?

Schema coverage is 100% and each parameter already has a meaningful description. The description adds value by instructing that rows must be a JSON array of objects and that key fields must be resolved via get_data_entity_info, which helps an agent avoid a common failure mode. Baseline 3 is exceeded, though not by a wide margin because the schema already explains all five parameters.

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 specific verb and resource: 'Idempotent import of rows into any entity via OData', and clearly distinguishes itself from dmf_import_file and odata_export_entity. An agent can immediately understand what this tool does and how it differs from bulk import and export siblings.

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

Usage Guidelines5/5

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

The description explicitly scopes usage to small-to-medium transactional loads, suggests a lower bound by example ('<= a few thousand rows'), and names dmf_import_file as the alternative for bulk loads. It also gives a concrete prerequisite: resolve key fields from get_data_entity_info rather than guessing them. This leaves no ambiguity about when to select this tool.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.