Skip to main content
Glama

Import order

import_order

Create or reuse items, then write a sales order. Ask which customer and sheet first. Each line has fields (Name/SKU/Price), quantity, and unit_price. Pass Barcode only when the source has a real GTIN. An existing SKU or barcode on that sheet is reused and its barcode is kept. Otherwise the server allocates the next code when sequential assignment already works. An unknown sheet_name is refused with "Call create_sheet first"; this tool does not create a sheet. On a GS1 sheet, Show choices together. Clickable form if the client supports it. Otherwise one number, only when it cannot show choices. Wait. Do not choose for the user. Do not continue until the user has answered. Do you want barcodes? No, no barcodes now (barcode_mode="none"). Cloudlabels generates EAN-13 (codes starting with 2 are internal store codes, not registered GS1 codes), barcode_mode="cloudlabels_ean13". This call only. Does not change sheet settings. I have my own codes (own GTIN). No option is recommended. A needs_input error lists those options and writes nothing: no customer, item, sheet, or order. If the organization has opted in to its GS1 company prefix for this column and the sheet standard is EAN-13, UPC-A, or EAN-8, a new row reserves the next prefix number before saving. barcode_source can be gs1_prefix. The cell stores the digit body without the check digit. A full prefix is an error and does not fall back to a random code. Each line returns barcode and barcode_source. Pass source_key so the same request returns the existing order. Requires the Orders plan feature.

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": {
      "lines": "<lines>"
    },
    "name": "import_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
memoNo
linesYes
currencyNo
sheet_nameNoExisting sheet name. Unknown names are refused; call create_sheet first. No sheet is auto-created.
source_keyNoIdempotency key, such as the email message id. The same key returns the existing order.
customer_idNo
barcode_modeNo
sheet_numberNo
customer_nameNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior4/5

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

Annotations only declare non-read-only, non-destructive, non-idempotent, and closed-world. The description adds substantial behavior beyond them: needs_input writes nothing, source_key returns the existing order, barcode allocation and GS1 prefix reservation rules, and the Orders plan requirement. The source_key idempotency claim sits awkwardly against idempotentHint=false, but it is conditional rather than a direct contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core instruction is front-loaded in two sentences, but the remainder is a verbose transcript of user-choice dialogue: 'Do you want barcodes? No, no barcodes now', 'Wait.', and 'Clickable form if the client supports it.' It contains duplicated, elliptical, and conversational fragments that should be rewritten as a structured decision list.

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?

For a complex write tool with no output schema, the description covers important side effects: item creation or reuse, sheet refusal, barcode allocation, idempotency, and the plan gate. It does not explain customer_id versus customer_name selection, currency or memo behavior, or what the created order contains beyond per-line barcode and barcode_source.

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?

Schema coverage is only 22%, with just sheet_name and source_key documented. The description partially compensates by explaining lines fields (Name/SKU/Price), quantity, unit_price, barcode_mode values, and source_key, but leaves memo, currency, customer_id, customer_name, and sheet_number unexplained and introduces an 'own GTIN' choice that has no matching enum value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence gives a specific verb and resource: 'Create or reuse items, then write a sales order.' It explicitly distinguishes itself from create_sheet by saying it does not create a sheet, but it never mentions plan_import, the obvious planning sibling, so sibling differentiation is incomplete.

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

Usage Guidelines3/5

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

It does tell the agent to ask which customer and sheet first, to wait for the user, and to route unknown sheets to create_sheet. But it never states when to use import_order instead of plan_import, bulk_create_items, or create_item, and the barcode guidance reads as a user-dialogue fragment rather than selection criteria.

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