Skip to main content
Glama

Search Orders

search_orders
Read-onlyIdempotent

Search orders by date range, customer email, order number, or product SKU. Returns a summary of matching orders with profit per order. Hard-capped at 100 results.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuNoProduct SKU to match against any line item on the order.
limitNoMaximum number of orders to return (default 20, hard-capped at 100).
end_dateNoEnd of the date range, in YYYY-MM-DD format, resolved as the end of that day in the tenant's timezone.
start_dateNoStart of the date range, in YYYY-MM-DD format, resolved as the start of that day in the tenant's timezone. At least one of start_date, end_date, customer_email, order_number, or sku is required.
order_numberNoThe store's own order number, with or without a leading '#', not the internal MerchantFlow order id.
customer_emailNoCustomer email to search for; it is hashed before querying so no plaintext email is used as a lookup key, and the customer_email field on each returned order is redacted.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
_metaNo
countNo
ordersNo
filtersNo
_messageNo
currencyNo
_truncatedNo
_tenant_contextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds genuine behavioral context beyond the annotations: the hard 100-result cap and the summary output shape with profit. No contradictions exist between description and 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?

Three short sentences with zero filler. The first sentence front-loads the primary action and criteria, the second adds output specifics, and the third gives the critical limit. Every sentence earns its place.

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?

The tool has six parameters but all are fully documented in the schema, and an output schema exists. The description contributes the summary-with-profit behavior and the hard cap, covering the non-obvious facets. An agent has everything needed to invoke it correctly without hunting for missing details.

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%—every parameter has a detailed description, including the hard cap, date format, and the requirement for at least one filter. The description merely lists the filter types (date range, email, order number, SKU) without adding new meaning, matching the baseline of 3 for full schema coverage.

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 uses a specific verb ('Search') and resource ('orders'), and enumerates the exact filter dimensions (date range, customer email, order number, product SKU), which clearly distinguishes it from generic search or lookup_order. The statement about returning a summary with profit per order further pins down its unique purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use the tool (when searching orders by one of the listed criteria) but never states when not to use it or names an alternative. With a sibling named lookup_order, explicit routing guidance would have been valuable, but the omission drops this to merely implied usage.

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