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 last 30 days, which is not that month.

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 30-day period.
fromNoFirst day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default 30-day period.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, yet the description still adds substantial behavior: revenue is before returns and must never be called net sales, bucket grain follows period length, and buckets[i].complete=false marks a partial bucket that must not be read as a drop. It also defines repeatBuyers precisely (2+ orders of the same product), which prevents a plausible misreading.

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 return shape and dense but purposeful, with parenthetical guards ('before returns, so never call it net sales') that earn their space. It runs long as a single paragraph with several nested clauses, which slightly taxes scanability for an agent.

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 by enumerating the returned sections (buckets, top-product revenue, lifecycle stage counts, repeatBuyers) and their caveats. Combined with the date-span rules, an agent has everything needed to call it and interpret the result.

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 coverage is 100% and both date parameters already document inclusive YYYY-MM-DD, send-together-or-omit-both, and the 30-day default. The description restates these with emphasis ('MUST be sent here', 'never after today') but adds little semantic detail beyond what the schema already says, so the baseline 3 applies.

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 (how product sales moved) plus the exact payload: bucketed revenue/units/orders, top-product revenue, lifecycle stages, and repeat buyers. The inclusion of lifecycle stages and repeat-buyer counts makes it distinguishable from adjacent tools such as get_top_products or get_product_performance without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives concrete trigger questions ('which products are growing or declining', 'is product X picking up', 'which products bring customers back') and a hard rule that operator-supplied dates MUST be passed here or the tool silently reads the last 30 days. It stops short of naming a sibling alternative or an explicit when-not-to-use case, which is what separates this from a 5.

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