Skip to main content
Glama

Commit Import Session

commit_import_session
Idempotent

Preview and commit a staged import session (governed two-step): call with preview=true for a full-pipeline dry-run — order count, date range, monthly historical shipped units, included/source date ranges, rows and orders omitted by the 36-month limit, would-create catalog counts, plus mapping and boundary-month warnings — and a single-use previewReceipt; show the customer the included range and monthly shipped units (does the span match the history they exported?) and relay any warnings verbatim, get their go-ahead, then repeat the call with the previewReceipt and a fresh idempotencyKey to commit. The receipt is bound to the staged file bytes AND the mapping, so any re-upload or re-map after the preview safely rejects the receipt. Commit is asynchronous: the response returns immediately and a background worker imports in 500-order chunks — poll get_import_session for committedOrders/totalOrders until status is Committed.

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": {
      "importSessionId": "<importSessionId>"
    },
    "name": "commit_import_session"
  }
}

Input Schema

NameRequiredDescriptionDefault
previewNoStep 1 of the required two-step write: set true to validate and receive a structured preview plus a single-use previewReceipt.
idempotencyKeyNoCaller-generated idempotency key; required with previewReceipt.
previewReceiptNoStep 2: the receipt returned by the preview call. Supply together with a fresh idempotencyKey to commit.
importSessionIdYesThe import session id (GUID).

Output Schema

NameRequiredDescriptionDefault
okNo
queuedNo
messageNo
previewNo
expiresAtNo
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: the annotations only say non-read-only, non-destructive, idempotent. The description adds that the receipt is single-use, bound to the staged file bytes AND the mapping, that commit is asynchronous with a 500-order chunked background worker, and that the response returns before work completes. Those are exactly the behavioral traits an agent cannot infer from structured fields.

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?

Front-loads the two-step purpose and the preview contents before the commit instructions, so the agent can act on the first clause. It is a single dense run-on paragraph with some clause stacking that could be split for readability, but almost every clause carries operational information.

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 two-mode, asynchronous mutation tool this covers the whole decision path: what preview returns, what the customer check is, what gate must be passed, how to commit, and how to follow progress. An output schema exists, yet the preview field list is still given because the agent must relay it to a human, which is justified rather than redundant.

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 baseline is 3, but the description adds real meaning: previewReceipt is single-use and cryptographically tied to file bytes plus mapping, and idempotencyKey must be fresh for the commit call. It stops short of explaining any format or length constraints, which the schema also omits.

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?

States a specific verb pairing and resource: 'Preview and commit a staged import session (governed two-step)'. It immediately distinguishes itself from the read-only sibling by explicitly naming get_import_session as the polling tool, so an agent can separate the write path from the status path 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?

Gives an explicit ordered procedure: call with preview=true first, show the customer the range and monthly units and relay warnings, obtain go-ahead, then repeat the call with the previewReceipt plus a fresh idempotencyKey. It also names the alternative for status tracking (poll get_import_session) and states the condition that invalidates a preview receipt (re-upload or re-map).

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