Skip to main content
Glama

Amend order

o2c_amend_order
Destructive

Replace the lines of a DRAFT order. Amendment exists only while the order is draft. After confirmation "what was confirmed" is a fixed fact the credit gate evaluated: the only permitted shrink is o2c_close_short, and growth is a new order. The passed lines replace all existing lines. Effects: order lines replaced.

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

Input Schema

NameRequiredDescriptionDefault
linesYesThe new full set of lines.
order_idYesThe draft order. An existing order id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the destructiveHint=true / idempotentHint=false annotations, it discloses the domain rule that replacement is only legal pre-confirmation and that the operation is a wholesale line swap rather than a patch. It does not describe what is returned or what happens on a non-draft order id, which is the remaining behavioral gap.

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-loaded with the core action and effect, and no sentence is filler. Minor deductions for the line break splitting a sentence mid-clause and for the dense credit-gate jargon in the middle clause, which costs a little readability.

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 two-parameter mutation with no output schema and strong annotations, the description covers purpose, precondition, replacement semantics and effect. It leaves unstated what a successful call returns and how non-draft input is rejected, which an agent would otherwise have to discover by trial.

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%, so both order_id and lines (including qty, item_id and the cents-based unit_price override) are already documented in structured form. The description reinforces the whole-set replace semantics of 'lines', which is useful for correct invocation, but adds no syntax or format detail beyond the schema — baseline 3.

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 and resource plus a hard scope constraint: 'Replace the lines of a DRAFT order' and 'The passed lines replace all existing lines.' It also implicitly separates itself from o2c_confirm_order and o2c_close_short by describing the draft-only window, so an agent can pick it out of the order lifecycle 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?

Explicit when-to-use ('Amendment exists only while the order is draft') and when-not ('After confirmation ... growth is a new order'), with the correct alternative named for the post-confirmation shrink case (o2c_close_short). The routing decision is fully determined without opening any sibling schema.

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.