Skip to main content
Glama

Product trends

get_product_trends
Read-onlyIdempotent

How product sales moved through the period, in buckets (grain day, week or month by the period's length; buckets[i].complete false = a part bucket, don't read it as a drop): revenue (before returns, so never call it net sales), units and orders per bucket for the whole catalogue, revenue per bucket for the top products (titles), and lifecycle stages (launch, growth, maturity, decline) with how many products and how much revenue sit in each. repeatBuyers lists per product how many identified customers bought it and how many bought it again (2+ orders of it). Use for 'which products are growing or declining', 'is product X picking up', 'which products bring customers back'. Optional from and to (inclusive YYYY-MM-DD, both or neither, never after today) read another span instead of the default period. A named month, a week or two dates the operator gave MUST be sent here: without them this reads the default period (the one on the operator's screen, else the last 30 days), which is not that month. When the operator names no period, send neither.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_product_trends"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days.
fromNoFirst day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / from / description
      Previous value: -"First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default 30-day period."New value: +"First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days."
    • changedInput schema / properties / to / description
      Previous value: -"Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default 30-day period."New value: +"Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days."
  2. Added

TDQS

A4.1/5.0
Behavior3/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower; the description still adds real value by flagging that revenue is pre-returns and must not be called net sales, and that `buckets[i].complete == false` is a partial bucket not a drop. It does not add anything about volume limits, latency or result size, so it is solid but not 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?

Front-loaded with the core answer and every clause carries content — no filler. It is one dense run-on block of parenthetical asides and semicolon chained clauses, which costs some scannability for an agent parsing the return shape.

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, and the description compensates by naming each returned field group (per-bucket revenue/units/orders, top-product revenue, lifecycle stages and their counts, repeat buyers) plus the partial-bucket caveat. For a two-optional-param read tool, an agent has everything needed to call it and interpret the response.

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 both date params are already documented; the description reinforces the coupling constraint (both or neither, never after today) and, usefully, ties the omission case to a routing decision about the operator-named period that the schema states only partially. It adds meaning beyond the schema rather than merely restating it, though the overlap is substantial.

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?

States a specific verb and resource — how product sales moved through the period — and enumerates the exact payload (buckets, revenue/units/orders, top-product revenue, lifecycle stages, repeatBuyers). It never names a sibling such as get_product_momentum or get_product_performance, so differentiation relies on the quoted example questions rather than an explicit contrast.

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?

Supplies concrete trigger phrases ('which products are growing or declining', 'is product X picking up') and then an explicit rule set for the date span: send both `from` and `to` when the operator names a month/week/dates, send neither when no period is named. The alternative (default period on the operator's screen, else last 30 days) is spelled out rather than 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.

Resources