Skip to main content
Glama

Get order stats

get_order_stats
Read-onlyIdempotent

Use this tool when the user asks how many orders or how much revenue their Convika pages brought, which page sells best, or which source or campaign brings orders: 「どのページが一番売れてる?」「Instagram からの注文は?」「今月の売上」「ChatGPT から来た注文は?」.

Returns the orders and revenue in the period, by page and by traffic source (the source an order recorded from the page view that led to it: UTM source, medium, or campaign, or the referring site; "(none)" when it had none). byArrival splits the same orders into those whose buyer came from an AI assistant (ai, and assistants: each assistant by name, one of "chatgpt.com", "perplexity.ai", "claude.ai", "gemini.google.com", "copilot.microsoft.com", "grok.com", "chat.deepseek.com", "meta.ai") and the rest (other), from the link's utm_source or the referring site of the page view that led to the order. It counts orders placed (not test, spam, duplicates, or declined, cancelled, refunded, or unpaid card orders); revenue counts paid orders (cash on delivery once accepted), less refunds. Amounts are in the currency's main unit as text.

Orders hold no visitor id, so they aren't joined to visitors: for a page with an "order" goal, conversion totals in the analytics tools are estimates (conversionsEstimated). For traffic and orders by source side by side, use analyze_source_quality.

On Free, counts and totals include the first 50 cash-on-delivery, bank-transfer, and payment-link orders of each UTC month; orders past that aren't counted (get_orders still lists them), omittedOverCap says how many, and the dashboard's Orders page lists them all. Pro and above have no cap. startDate and endDate are whole days (YYYY-MM-DD) in timeZone, UTC when left out; leave both out for all time.

Input Schema

NameRequiredDescriptionDefault
siteIdNoOnly this page. Leave out for every page.
endDateNoLast day, YYYY-MM-DD
timeZoneNoIANA time zone name for the days in this response, such as America/New_York, Europe/Berlin, or Asia/Tokyo. Leave it out for the workspace's time zone (UTC when none is set). It affects only this response: the workspace's time zone stays as it is, and only the workspace's owner changes it, in the dashboard's Settings. Abbreviations such as EST and offsets such as +09:00 aren't accepted.
startDateNoFirst day, YYYY-MM-DD
sourceDimensionNoWhat bySource groups by. Defaults to utm_source.utm_source

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description goes well beyond them: counting rules (excludes test, spam, duplicates, declined, cancelled, refunded, unpaid), revenue definition (paid orders, COD once accepted, less refunds), currency returned as text, the Free-plan 50-orders-per-UTC-month cap with omittedOverCap, and the visitor-join limitation that makes analytics conversions estimates. That is exactly the behavioral context an agent needs to trust the numbers.

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 use-case trigger and alternatives are front-loaded and no sentence is pure filler, but the body is a dense single block, and the traffic-source definition is effectively stated twice (once for bySource, once for byArrival). Slightly tighter phrasing would make the caveats easier to scan.

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?

There is no output schema, so the description carries the return-shape burden and does: orders and revenue totals, by page, by source dimension, and the byArrival split with the named assistant domains. Plan-tier limitations, date semantics, and the visitor-join caveat are all disclosed, leaving nothing an agent needs in order to call it correctly.

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; the description adds real meaning on top by explaining that startDate/endDate are whole days interpreted in timeZone, that leaving both out means all time, and by defining what the bySource grouping actually represents (UTM source/medium/campaign or referrer, with "(none)"). siteId's "only this page" semantics are already fully covered by 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?

The description names a specific verb and resource set — order counts and revenue broken down by page and by traffic source, plus byArrival — and does so in the user's own vocabulary (「どのページが一番売れてる?」「今月の売上」). An agent can separate it from get_orders (raw list) and analyze_source_quality (traffic+orders side by side) 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?

It states explicitly when to use it ("Use this tool when the user asks how many orders or how much revenue..."), gives concrete example utterances including Japanese ones, and names the alternative plus the condition that selects it ("For traffic and orders by source side by side, use analyze_source_quality"). Little is left to inference.

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.