Skip to main content
Glama

Reorder invoice items

reorder_invoice_items

Set the display order of an invoice's line items. Pass the full desired order: every item id with its 0-based display_order. Item ids come from get_invoice or add_invoice_item.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
invoice_idYesThe invoice UUID whose items are reordered.
item_orderYesFull desired order: one entry per line item (1-200).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reorderedYesTrue once the new order is saved.
invoice_idYesThe reordered invoice UUID.
items_countYesNumber of items whose position was set.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / invoice_id / description
      Added value: +"The invoice UUID whose items are reordered."
    • addedInput schema / properties / item_order / description
      Added value: +"Full desired order: one entry per line item (1-200)."
    • addedInput schema / properties / item_order / items / properties / display_order / description
      Added value: +"New 0-based position of that item."
    • addedInput schema / properties / item_order / items / properties / id / description
      Added value: +"Line item UUID."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "invoice_id": {
      +      "description": "The reordered invoice UUID.",
      +      "type": "string"
      +    },
      +    "items_count": {
      +      "description": "Number of items whose position was set.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "reordered": {
      +      "description": "True once the new order is saved.",
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "reordered",
      +    "invoice_id",
      +    "items_count"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.2/5.0
Behavior3/5

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

The description reveals that the tool sets a new display order and that the order must be full ('every item id'). It does not mention validation behavior, error handling, or whether it replaces the entire order, but the core behavior is transparent. Annotations confirm it is a write operation (readOnlyHint false).

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

Conciseness5/5

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

The description is concise, consisting of two clear sentences. It avoids redundancy and directly explains the action and key usage requirements.

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 tool with only two parameters, the description and schema together provide sufficient context for usage. The description explains how to obtain item IDs and the requirement for a full order. It could mention error conditions but is otherwise complete.

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?

The input schema provides descriptions for both parameters and nested fields, achieving 100% schema coverage. The description adds semantic value by clarifying that the order must be complete and that item IDs should come from specific sources, going beyond the schema text.

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 clearly states the tool's purpose: 'Set the display order of an invoice's line items.' It is specific and distinct from sibling tools like update_invoice_item or get_invoice.

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?

The description gives clear usage guidance: 'Pass the full desired order' and indicates where item IDs come from ('get_invoice or add_invoice_item'). It implies this is for reordering multiple items, though it does not explicitly contrast with updating individual items.

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.