Skip to main content
Glama

get_daily_metrics

Get daily/period numbers from one of three domains — pass domain to pick which, report to pick the report within it. report:"daily" exists in ALL THREE domains and means a DIFFERENT payload in each — always pass both domain and report together, never assume "daily" behaves the same across domains.

• domain:"funnel" — the daily series WITH sessions/CVR/funnel steps. Reports: daily (default — { period, data, charts, presentation }, each day has revenue, sessions, visitors, cvr, aov, orders, addToCart, reachedCheckout; DEFAULT TO RENDERING THE RELEVANT CHART), traffic_breakdown (Shopify ShopifyQL traffic dimensions for the period — bySource, byDevice, topLandingPages, topReferrers; requires Shopify Plus/Advanced and traffic sync to have run). No default window — pass startDate/endDate explicitly (falls back to a 30-day window if omitted, but don't rely on that). • domain:"revenue" — REVENUE-centric (the only domain with by_channel/by_country/pnl_summary). Reports: daily (default — time-series of revenue + orders with chart specs and event context), by_channel (net sales + order count split by sales channel — requires Shopify Plus/Advanced), by_country (net sales by billing country — requires Shopify Plus/Advanced), pnl_summary (full P&L: gross/net sales, discounts, returns, shipping, taxes, payment processing fees, orders, items — requires Shopify Plus/Advanced; fee coverage can be partial, the response states it). All money values formatted currency strings. Defaults to a 30-day window ending yesterday. • domain:"operational" — the OPERATIONAL daily view (new vs returning customers, fulfillment rate, refunds, discount usage) from a pre-computed DailyStat rollup (updated by the scheduler, not a live query). Reports: daily (each day's revenue, orders, avgOrderValue, itemsSold, newCustomers, returningCustomers, discountUsageRate, fulfillmentRate, refunds), summary (period totals, daily averages, rates). Defaults to a 30-day window ending yesterday (report:"daily") or its own real aggregated window (report:"summary").

Use "funnel" for sessions/CVR/traffic questions, "revenue" for channel/country/P&L breakdowns, "operational" for dashboard KPI tracking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoFor domain:"operational", report:"daily": number of days to return (default: 30).
domainYesWhich daily-metrics domain to query. See the tool description for the report list and defaults per domain.
reportNoReport type — valid values depend on `domain` (see tool description). Defaults to "daily" in every domain if omitted, but "daily" means a different payload per domain.
_offsetNoPagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page.
endDateNoEnd date (YYYY-MM-DD). Defaults to yesterday (last fully-closed day) when omitted.
startDateNoStart date (YYYY-MM-DD). Default window (if omitted) varies by domain — see tool description; domain:"funnel" has no real default, always pass this explicitly.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.6/5.0
Behavior4/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 well: it discloses that the operational domain reads a pre-computed DailyStat rollup ('updated by the scheduler, not a live query'), that P&L fee coverage can be partial and the response states it, and that money values are formatted currency strings. It stops short of describing auth requirements or rate limits, so it is strong rather than exhaustive.

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?

Well front-loaded: the cross-domain warning about 'daily' comes before the per-domain bullets, so an agent gets the critical constraint first. The three bullets are logically structured, but the repeated 'requires Shopify Plus/Advanced' and default-window restatements across bullets add avoidable redundancy for a description this long.

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?

No output schema exists, so the description compensates by enumerating the returned fields per report (revenue, sessions, cvr, aov, newCustomers, fulfillmentRate, etc.) and output shape ({ period, data, charts, presentation }). For a 6-parameter, three-domain dispatcher, an agent has everything needed 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, but the description supplies meaning the schema explicitly defers to it: the valid `report` values per domain (the schema's `report` field has no enum and says 'see tool description'), which report is the default in each domain, and the fact that funnel has no real default window. That is real added semantic value 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 (get daily/period numbers) and immediately qualifies it with the three-domain dispatch model, going as far as warning that the same `report:"daily"` value yields a DIFFERENT payload per domain. This is precisely the kind of disambiguation an agent needs to separate it from siblings like get_store_summary or get_weekly_trends.

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 routing rules ('Use "funnel" for sessions/CVR/traffic questions, "revenue" for channel/country/P&L breakdowns, "operational" for dashboard KPI tracking'), plus per-report prerequisites (Shopify Plus/Advanced, traffic sync) and default-window behavior per domain. It also warns when not to assume — never assume 'daily' behaves the same across domains.

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