Skip to main content
Glama

Transition Purchase Order

transition_purchase_order
DestructiveIdempotent

Atomically execute a previously previewed purchase-order transition. Requires the single-use previewReceipt, exact entityVersion, and a caller-generated idempotencyKey. The server recomputes canonical state inside a serializable transaction and rejects stale previews. Reusing the same idempotency key with the same input safely replays the stored response; changed input is rejected. The required privileged capability is purchasing.execute, or receiving.execute for QuickReceive.

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": {
      "purchaseOrderId": "<purchaseOrderId>",
      "transition": "<transition>",
      "previewReceipt": "<previewReceipt>",
      "expectedEntityVersion": "<expectedEntityVersion>",
      "idempotencyKey": "<idempotencyKey>"
    },
    "name": "transition_purchase_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
transitionYesExact transition from preview: IssueOrRouteForApproval, Cancel, or QuickReceive.
idempotencyKeyYesCaller-generated stable idempotency key for this exact transition.
previewReceiptYesOpaque single-use receipt returned by preview_purchase_order_transition.
purchaseOrderIdYesPurchase order id (GUID).
expectedEntityVersionYesExact 64-character entityVersion returned by preview.

Output Schema

NameRequiredDescriptionDefault
okNo
resultNo
effectsNo
warningsNo
expiresAtNo
operationNo
actionItemIdNo
confirmationNo
correlationIdNo
approvalResultNo
idempotencyKeyNo
previewReceiptNo
idempotentReplayNo
allowedNextActionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds substantive behavior: canonical state is recomputed inside a serializable transaction, stale previews are rejected, same-key/same-input calls replay the stored response while changed input is rejected, and the required privileged capability is named (purchasing.execute, or receiving.execute for QuickReceive). Those are exactly the failure modes and auth requirements an agent needs and cannot infer from annotations.

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 tight sentences, front-loaded with the action and its preconditions, then the transactional guarantee, then idempotency, then the capability requirement. No restatement of the title or of schema content beyond what adds meaning.

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 five-parameter destructive mutation with an output schema, the description covers the preconditions, concurrency model, retry semantics, and authorization, leaving return values to the output schema. There is no material gap an agent would need to fill before calling it.

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 is 3, but the description adds meaning the schema does not: the receipt is single-use, the entity version must be the exact one returned by preview, and the idempotency key governs replay-versus-rejection semantics. Only the transition enum values are left to the schema alone.

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 specific verb and resource ('Atomically execute a previously previewed purchase-order transition') and ties the operation to its preview step, which clearly separates it from preview_purchase_order_transition. An agent can tell from the first sentence that this is the commit half of a two-phase flow.

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 the precondition clearly ('previously previewed', plus the required receipt/version/idempotency inputs), which tells the agent when the tool is applicable. It stops short of explicit routing, though — it never says to call preview_purchase_order_transition first by name, nor does it distinguish this tool from overlapping siblings such as cancel_purchase_order or issue_purchase_order, which could be picked by mistake for the Cancel or IssueOrRouteForApproval transitions.

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