Skip to main content
Glama

Update order status

update_order_status
DestructiveIdempotent

Update order status to reflect its progress through the sales lifecycle. Transition an order between permitted states, such as pending to paid or shipped to delivered, ensuring proper flow.

Instructions

Move an order through its lifecycle: pending->paid|cancelled, paid->shipped, shipped->delivered. Any other transition is rejected (CONFLICT) with the allowed next statuses. 'refunded' is never set directly (use issue_refund). Setting the current status again is a no-op. Changes are audit-logged.

Input Schema

NameRequiredDescriptionDefault
noteNoOptional context stored in the audit log (e.g. tracking number).
statusYesTarget status. Allowed moves: pending->paid|cancelled, paid->shipped, shipped->delivered.
order_idYesNumeric order ID, e.g. 1042.

Output Schema

NameRequiredDescriptionDefault
statusYes
changedYesFalse when the order was already in the requested status (no-op).
order_idYes
updated_atYes
previous_statusYes
allowed_next_statusesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations declare destructiveHint=true and idempotentHint=true; the description corroborates and enriches this by explaining the rejection behavior (409 CONFLICT with the allowed next statuses in the response), the no-op on same-status writes, and that changes are audit-logged. These are exactly the failure modes and side effects an agent needs before invoking a mutation.

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?

Four short sentences, front-loaded with the transition table, followed by the failure mode, the exclusion, and the idempotency nuance. No filler; each clause carries an operational rule.

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 3-parameter mutation tool with full schema coverage, rich annotations, and an output schema, the description covers everything an agent needs: valid inputs, rejection semantics, the excluded value, and side effects. Nothing material is delegated to guesswork.

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 the baseline would be 3, but the description adds real meaning the schema does not: 'refunded' appears in the enum yet must never be set directly, which materially changes how the status parameter should be used. The note parameter's audit-log purpose is left to the schema, which already documents it well.

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 and immediately defines the exact state machine it operates on (pending->paid|cancelled, paid->shipped, shipped->delivered). It also names the sibling tool to use instead for 'refunded', so an agent can separate this from issue_refund without opening either 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?

Explicitly enumerates valid transitions, states that other transitions are rejected with CONFLICT plus the allowed next statuses, and routes 'refunded' to issue_refund. It also pre-empts the redundant-call case by noting that re-setting the current status is a no-op.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.