Skip to main content
Glama

Get Order By Id

get_order_by_id
Read-onlyIdempotent

Returns one order of the current company by its orderId, in the same shape as the orders from get_current_active_orders and get_current_scheduled_orders. It finds orders that are currently active or scheduled. An order that is already delivered or failed, or does not exist for this company, returns an error. Use it to fetch the latest state of one order before editing it: the order contains every field that edit_order uses, under the same names, so send it to edit_order with only the requested changes applied.

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": {
      "orderId": "<orderId>"
    },
    "name": "get_order_by_id"
  }
}

Input Schema

NameRequiredDescriptionDefault
orderIdYesId of the order, the orderId field of an order

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 the read-only, idempotent, closed-world safety profile, and the description still adds non-obvious behavior: the lookup is scoped to active or scheduled orders only, delivered/failed orders are not found, and the payload matches the list endpoints field-for-field so it is round-trippable into edit_order.

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 tight sentences ordered by importance: what it returns and its shape, what it will and will not find, then the intended workflow. No redundant restatement of the name or title.

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 single-parameter read with no output schema, the description supplies the return shape by reference to sibling tools, the failure conditions, and the downstream handoff to edit_order — everything an agent needs to call it correctly.

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 the single orderId parameter is already documented as 'the orderId field of an order'. The description's only added constraint is that the order must belong to the current company, which is marginal beyond the schema.

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 ('Returns one order ... by its orderId') and immediately distinguishes it from the sibling list tools by noting the identical return shape of get_current_active_orders and get_current_scheduled_orders.

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 prescribes the workflow: fetch the latest state of one order before editing it, then pass the result to edit_order with only the requested changes applied. It also states the exclusion — delivered, failed, or out-of-company orders return an error — so the agent knows when this tool will not serve.

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