Skip to main content
Glama

Remove order item

remove_order_item
Destructive

Remove a line item from an order. Recomputes the order total. Only allowed while the order is pending or confirmed; otherwise it fails with 409 CONFLICT "Order lines can only be changed while the order is pending or confirmed". Use get_order to find the order's externalId and the item's itemId. The result echoes the operating workspace.

Input Schema

NameRequiredDescriptionDefault
itemIdYesThe order item id returned by get_order.
externalIdYesThe order externalId returned by list_orders or create_order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed1 schema field changed
    • changedInput schema / properties / itemId / description
      Previous value: -"The order item id returned by the matching search/list tool."New value: +"The order item id returned by get_order."
  3. Changed2 schema fields changed
    • addedInput schema / properties / externalId / description
      Added value: +"The order externalId returned by list_orders or create_order."
    • addedInput schema / properties / itemId / description
      Added value: +"The order item id returned by the matching search/list tool."
  4. Added

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, non-idempotent and non-readOnly. Beyond that, the description discloses a side effect (the order total is recomputed), the state restriction with a verbatim 409 CONFLICT message, and what the result echoes. This is substantive context the annotations do not carry.

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?

The critical constraint is front-loaded immediately after the purpose statement, and each sentence carries information. The verbatim error-string quotation is slightly verbose but justified as it tells the agent exactly what a 409 means here.

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 destructive mutation with no output schema, the description covers the mutation effect, the guard condition, parameter sourcing, and the return behavior ('echoes the operating workspace'). An agent has what it needs to call it correctly; only the absence of sibling cross-references leaves a small gap.

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 100% and the schema already documents both parameters, including their provenance ('returned by get_order', 'returned by list_orders or create_order'). The description largely repeats that sourcing hint via get_order, adding little beyond the schema, so the baseline 3 applies.

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 opens with a precise verb+resource ('Remove a line item from an order'), which is inherently distinguishable from sibling tools add_order_item, update_order_item, and update_order_status. An agent can identify the operation 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 Guidelines4/5

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

It states an explicit precondition ('Only allowed while the order is pending or confirmed') with the exact failure mode, and directs the agent to get_order to source the parameters. It stops short of naming sibling alternatives (e.g., update_order_item) for other line-item changes, so it is strong but not fully comparative.

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