Skip to main content
Glama

get_metrics_comparison

BEST FOR COMPARISONS AND THE CANONICAL CONVERSION RATE: Get core e-commerce metrics (Revenue, Sessions, CVR, AOV, Revenue per Session) with period-over-period comparisons. CVR here uses Shopify TrafficStat sessions (Plus/Advanced) — or GA4 sessions as fallback — divided by REAL Shopify orders. This is the right source for 'what's my conversion rate?' / 'how's my CVR trending?' questions. Do NOT use Triple Whale pixel CVR (from get_connector_data(connector:'triple-whale') or get_marketing_performance._pixelFunnel) as a stand-in: pixel undercounts purchases and sessions and produces misleading absolute numbers. Supports WoW (week-over-week), MoM (month-over-month), YoY (year-over-year), and custom period comparisons. Returns { period, metrics, comparison, charts, presentation }. charts is an array of grouped-bar specs (one per headline metric, current vs comparison) ready to drop into any plotting library. DEFAULT TO RENDERING THE RELEVANT CHART when the user is comparing periods or asks 'how is X vs Y' — bar charts are the natural fit. Use comparison.changes for the % delta caption. Use raw numbers from metrics only when the user asks for a single specific value.

Notes

  • This is the canonical CVR source. Do not substitute Triple Whale pixel CVR (get_connector_data(connector:'triple-whale') / _pixelFunnel).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
_offsetNoPagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page.
endDateYesEnd date of current period (YYYY-MM-DD)
startDateYesStart date of current period (YYYY-MM-DD)
comparisonNoComparison type: wow (week-over-week), mom (month-over-month), yoy (year-over-year), previous (equivalent previous period)
compareLabelNoLabel for custom comparison period (e.g., 'Last Year Black Friday Sale')
compareEndDateNoFor custom comparison: end date of comparison period (YYYY-MM-DD)
compareStartDateNoFor custom comparison: start date of comparison period (YYYY-MM-DD)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.4/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 behavioral burden and does well: it names the underlying data source, warns that pixel CVR undercounts, and describes the return shape including charts and presentation. It does not state read-only/no-side-effects behavior or rate limits, but for a metrics-reading tool this is a minor omission rather than a serious gap.

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 description is long but front-loaded around its primary purpose and usage caveats, and every major section adds decision-relevant information. The Notes section repeats the Triple Whale warning already stated in the body, which is mild redundancy but not enough to undermine an otherwise well-structured description.

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, and the description compensates thoroughly by describing the return object keys, the charts array format, and how to use comparison.changes. It also covers the canonical metric definitions and period comparison modes, leaving little ambiguity for an agent to call and use the tool correctly.

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 seven parameters, including dates, comparison enum, and custom comparison labels. The description reinforces comparison types (WoW, MoM, YoY, custom) but mostly restates what the schema provides, so the baseline of 3 is appropriate.

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 states a specific verb and resource ('Get core e-commerce metrics') and identifies the canonical CVR source, which clearly distinguishes it from sibling tools like get_marketing_performance and get_connector_data. It also names the metrics returned, so an agent can tell at a glance what the tool produces.

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 explicitly says when to use this tool ('BEST FOR COMPARISONS AND THE CANONICAL CONVERSION RATE') and when not to use an alternative ('Do NOT use Triple Whale pixel CVR... as a stand-in'). It also names the specific alternative tools and explains why they would be misleading, which is unusually strong routing guidance.

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