Skip to main content
Glama

Get Sales Order

get_sales_order
Read-only

Read ONE sales order with its lines — by salesOrderId (GUID) or by its document number (exact, case-insensitive). Returns the header (status, customer, store, warehouse, totals, dates, notes), whether the order is still editable, an opaque entityVersion, and every line with its lineId, item, quantities (ordered/shipped/backordered), unit price and totals. Use get_sales_orders to find orders, then this tool for line detail; the lineIds it returns are what update_sales_order's updateLines/removeLineIds address. A client-pinned token only sees its own client's orders.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_sales_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
numberNoSales order document number (exact, case-insensitive). Provide this or salesOrderId.
salesOrderIdNoSales order id (GUID). Provide this or number.

Output Schema

NameRequiredDescriptionDefault
okNo
orderNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, and the description adds real context beyond them: client-pinned token visibility scoping, an "editable" flag, and an opaque entityVersion. It stops short of explaining what the entityVersion is for (optimistic concurrency?) or what happens when neither identifier matches, which keeps it below a 5.

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?

Three tightly packed sentences, front-loaded with the identity lookup, then the return payload, then usage routing. No filler and no repetition of the title; every clause carries operational information.

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?

An output schema exists, yet the description still sketches the header/line payload, which helps an agent plan downstream use of lineIds and entityVersion. Combined with the token-scoping caveat and the sibling routing, nothing needed to call it correctly is missing.

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 both parameters are already documented with the same details the description repeats (GUID, exact/case-insensitive, "provide this or..."). The description adds no meaning beyond the schema, so the baseline 3 applies. Also notes required=0 means neither is enforced, but that too is schema-visible.

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?

Opens with a specific verb and resource plus an explicit scope marker: "Read ONE sales order with its lines." Immediately disambiguates lookup by salesOrderId (GUID) vs document number, and the sibling contrast with get_sales_orders is stated outright, so an agent can distinguish the two 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?

Gives an explicit workflow: "Use get_sales_orders to find orders, then this tool for line detail," and closes the loop by noting the returned lineIds are what update_sales_order's updateLines/removeLineIds address. That is genuine when-to-use and when-to-use-something-else guidance tied to real sibling tools.

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