Skip to main content
Glama

Find Orders

find_orders

Look up orders by exact ID or customer name to see line items with product names and prices. This is the drill-down from sales totals to what one customer bought.

Instructions

Looks up orders by exact order id or by customer name (case-insensitive substring match, so 'maya' finds 'Maya Chen') and returns each order's line items enriched with product name, unit price and line total. This is the drill-down behind the aggregates: analyze_sales_metrics reports what sold in total, this reports what a single order or customer actually bought. Results are newest first. Line prices come from the current catalog; a line whose product is no longer catalogued reports null rather than an invented price. Supplying both filters requires an order to satisfy both; the echoed 'filters' block reports the values actually matched on. A filter that matches nothing is a successful lookup with count 0 and an empty 'orders' array — the same answer list_all_products gives — not a tool error. Results are deliberately uncapped by default and there is no pagination: 'customer_name' is a substring match, so a broad query returns every matching order in the dataset (a one-letter name matches most of it). Pass 'limit' to bound a broad query — 'totalMatches' always reports how many matched in full, so a capped answer cannot be mistaken for a complete one. Narrow the filter rather than expecting a page, and prefer 'order_id' when you want a single order.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoReturn at most this many matches, newest first. 'totalMatches' still reports the full match count. Omit to return every match.
order_idNoExact order id to fetch, e.g. 'ord_1042'. Case-insensitive.
customer_nameNoCustomer name to match, case-insensitively as a substring: 'maya' matches 'Maya Chen'. Use this to answer questions like 'what did Maya order?'.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countYes
limitYes
ordersYes
filtersYes
totalMatchesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.1

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so thoroughly: newest-first ordering, uncapped-by-default with no pagination, null prices for de-catalogued products rather than invented ones, a broad substring filter matching most of the dataset, the echoed 'filters' block, and that a zero-match result is a success not a tool error. These are exactly the failure modes an agent would otherwise stumble into.

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

Conciseness4/5

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

The core purpose and the aggregate-vs-drill-down framing are front-loaded, and each subsequent sentence adds a distinct behavioral fact. The passage is long and dense, and a couple of points (the list_all_products aside, the one-letter-name aside) could be trimmed, but there is little filler.

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 so return values need not be spelled out, yet the description still clarifies the highest-risk aspects of the response (ordering, cap vs totalMatches, null prices, empty-array success). Combined with the behavioral coverage, an agent has everything needed to call it correctly and interpret the result.

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 real meaning beyond the schema: the substring/case-insensitive behavior with a concrete example, the AND semantics when both filters are supplied, and the interplay of 'limit' with the always-full 'totalMatches' count. This goes beyond restating the field descriptions.

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+resource ('looks up orders') plus two distinct lookup modes (exact order_id or substring customer_name) and the enrichment applied to returns (product name, unit price, line total). It explicitly distinguishes itself from the sibling analyze_sales_metrics as 'the drill-down behind the aggregates', so an agent can route without opening another 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 explicit when-to-use routing ('prefer order_id when you want a single order', narrow the filter rather than expecting a page), names the alternative (analyze_sales_metrics) and the condition that selects it. It also clarifies the empty-result and combined-filter cases, leaving nothing to inference.

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