Skip to main content
Glama

Save EDI Item Mapping

save_edi_item_mapping
Destructive

Create or edit one EDI item mapping: which Spark item a trading partner's SKU or UPC stands for, with the customer's description and unit, the conversion to the Spark unit and the customer price. Omit id to create (tradingPartnerId, itemId and a customerSku or customerUpc required; get ids from list_edi_trading_partners and list_items); pass id to edit, where every omitted field keeps its value. A customer SKU or UPC maps to one item per partner. Requires an operator (unpinned) credential.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "input": "<input>"
    },
    "name": "save_edi_item_mapping"
  }
}

Input Schema

NameRequiredDescriptionDefault
idNoThe item mapping id (GUID) to edit; omit to create.
inputYesThe fields to set.
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt. Nothing changes until the commit call.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt to commit.
previewReceiptNoStep 2 of the required two-step write: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit; calls without it are refused.

Output Schema

NameRequiredDescriptionDefault
idNo
okNo
deletedNo
previewNo
removedNo
expiresAtNo
identifierNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses the required two-step preview-then-commit write, that nothing changes until the commit call, and that an operator (unpinned) credential is required. Those are operational facts the destructiveHint/openWorldHint flags cannot convey, and nothing in the description contradicts them.

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?

Three tightly packed sentences with the purpose front-loaded and no filler. The middle sentence is semicolon-heavy and carries the create-mode rules in one long clause, which costs a little readability but no information is wasted.

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 nested, non-idempotent, destructive write tool with an output schema and full param coverage, this is complete: create/edit semantics, prerequisites, id sources, uniqueness, credential requirement and the two-step safety flow are all stated. Return-value shape is properly left to the output schema.

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% so the baseline is 3, but the description adds real meaning: id is the create-vs-edit switch, omitted fields preserve existing values on edit, and customerSku/customerUpc plus tradingPartnerId/itemId are conditional-on-create requirements. It stops short of explaining preview/idempotencyKey/previewReceipt mechanics in prose, leaving those to the schema.

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?

Opens with a specific verb plus resource ("Create or edit one EDI item mapping") and then defines the resource itself — which Spark item a partner's SKU/UPC stands for, with description, unit, conversion and price. That is clearly distinguishable from list_edi_item_mappings and delete_edi_item_mapping without opening any schema.

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?

Explicitly routes the agent: omit id to create, pass id to edit (with omitted fields retaining their values), and names the sibling tools to call for the required ids (list_edi_trading_partners, list_items). It also states the creation prerequisites and the one-SKU-per-partner constraint, so no inference is needed to pick the right mode.

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.

Resources