Skip to main content
Glama

get_weekly_trends

Get weekly revenue, orders, and items sold as a time series. Data is aggregated live from the Shopify Order table. Returns { rows, charts, presentation }. rows is the table — each row: weekOf, revenue (formatted), orders, itemsSold. charts is an array of three ready-to-render chart specs (revenue, orders, items — separate charts because units differ) in long/tidy format with metadata. DEFAULT TO RENDERING THE CHART when the user asks about trends, weekly patterns, seasonality, or uses 'show me' / 'how is' / 'pattern' phrasing. Fall back to numbers from rows only when the user asks for a single specific week.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
weeksNoNumber of weeks (default: 12)
_offsetNoPagination offset. If a response includes _pagination.hasMore=true, use _offset to fetch the next page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added
  2. Removed
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden; it discloses the data source ('aggregated live from the Shopify Order table'), the presence of a presentation layer, and that the charts come pre-built and in long/tidy format. It stops short of stating freshness/latency guarantees or any permission requirements, but for a read-only time-series tool the behavioral picture is largely covered.

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?

Reasonably tight and front-loaded: purpose first, then return shape, then the rendering-vs-numbers rule. The chart-explanation sentence ('separate charts because units differ') is slightly verbose but does preempt a design question an agent might otherwise ask.

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

Completeness4/5

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

With no output schema, the description must explain returns, and it does well (rows/charts/presentation, row fields, chart count and format). The only thin spot is that the default week count and pagination mechanics live solely in the schema, but since the schema covers them at 100% the overall picture is complete.

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% (both `weeks` and `_offset` are documented in the schema, including the default of 12 and the _pagination.hasMore workflow). The description adds no parameter meaning beyond that, so the baseline 3 applies – it neither compensates for nor undermines 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 ('Get') and resource ('weekly revenue, orders, and items sold as a time series'), with the weekly granularity distinguishing it from siblings like get_daily_metrics, get_yoy_monthly, and get_timeline. An agent can tell what it produces without opening the 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?

Explicit when-to-use ('user asks about trends, weekly patterns, seasonality, or uses show me / how is / pattern phrasing'), an explicit default ('DEFAULT TO RENDERING THE CHART'), and an explicit when-not alternative ('Fall back to numbers from rows only when the user asks for a single specific week'). This is close to ideal 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