Skip to main content
Glama

get_orders

Get order analytics by dimension. Reports: by_status (order counts/revenue by financial status), by_country (geographic sales breakdown — supports compare for WoW/MoM/YoY trend, returns top rising/falling countries), by_product (BEST FOR: 'how many customers bought product X?', 'which products have the most unique buyers?', product-level customer counts. Returns uniqueCustomers, orderCount, unitsSold, and revenue per product. Use this whenever the question involves customers AND products together), by_tag (order volume per Shopify order tag with SUDDEN-DROP DETECTION — compares the last 7 days vs the prior weeks and flags tags whose order count fell significantly. BEST FOR: 'did orders with tag X drop?', 'has any marketplace/dropship channel stopped?'. Pass tag to focus one tag, or omit to scan all tags; returns a drops list plus per-tag current/baseline/change).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagNoFor by_tag: focus a single order tag (case-insensitive). Omit to scan every tag and surface the ones dropping.
limitNoFor by_country: number of countries (default: 10). For by_tag: max tags returned (default: 20).
reportYesReport type
sortByNoFor by_product: sort field (default: revenue)
_offsetNoPagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page.
compareNoFor by_country: attach a `comparison` block with rising/falling countries vs the WoW/MoM/YoY/previous-period window.
endDateNoEnd date (YYYY-MM-DD)
lagDaysNoFor by_tag: end the windows this many days back so the current week is complete days (default 1). Raise it if a marketplace app applies its order tag with a delay.
startDateNoStart date (YYYY-MM-DD)
lookbackWeeksNoFor by_tag: number of prior weekly windows to use as the baseline (default 4, range 2-12).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A3.5/5.0
Behavior3/5

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

No annotations are provided, so the description must carry the full behavioral burden. It does disclose valuable behavior for by_tag (sudden-drop detection, weekly comparison windows, drop output) and by_country comparison blocks, which is strong. But it says nothing about auth, rate limits, data freshness, or behavior for by_status/by_product beyond field names.

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

Conciseness3/5

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

The description is information-dense but reads as one long run-on sentence with nested parentheticals, mixing purpose, per-mode guidance, and example questions. It is front-loaded with the core purpose, which helps, but the density and length hurt scannability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter, four-mode analytics tool with no output schema and no annotations, the description covers the modes well but omits return-shape expectations (beyond field names), pagination behavior despite _offset, date-range defaults, and safety/auth context. It is adequate but leaves meaningful gaps.

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 description coverage is 100%, so the schema already documents all 10 parameters including tag, limit, compare, lagDays, and lookbackWeeks. The description reinforces a few mode-specific uses (tag focus, compare attach) but adds little syntax or constraint detail beyond the schema. Baseline 3 applies when schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns order analytics broken down by a chosen dimension and enumerates each report mode with specific metrics. It distinguishes its report scope from siblings conceptually, though it does not name a specific sibling tool to contrast with like query_orders vs get_order.

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 provides explicit 'BEST FOR' guidance for by_product and by_tag, including example natural-language questions and when to prefer each mode. It does not, however, state when to use this tool over sibling tools such as query_orders or get_top_products.

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