Skip to main content
Glama
victorshevtsov

Shop MCP Server

revenue_by_period

Calculate revenue by year or month, excluding cancelled orders, to analyze sales trends over a specified date range.

Instructions

Revenue (sum of orders.total_amount) EXCLUDING cancelled orders, grouped by period. group_by = "year" (default) or "month" (-> YYYY-MM). Returns rows sorted by period ascending; a period with no data simply yields no row. Each row: { period, revenue }.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toNoOnly include orders with order_date <= this ISO date/datetime.
fromNoOnly include orders with order_date >= this ISO date/datetime.
group_byNoGrouping period: 'year' (YYYY) or 'month' (YYYY-MM). Default 'year'.
Install Server

TDQS

A4.1/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 disclosure burden and handles it well: it reveals the cancelled-order exclusion, ascending sort order, the 'empty period yields no row' gap behavior (valuable — prevents assuming zero-filled periods), and the exact row shape { period, revenue }. Minor gaps remain (behavior for inverted from/to ranges, timezone handling of ISO datetimes), but the core behavioral traits an agent needs are disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three dense sentences with zero filler: sentence one states the computation and exclusion, sentence two explains the only nontrivial parameter's format, sentence three covers output shape, sort order, and gap behavior. Every clause earns its place and the most decision-relevant fact (cancelled exclusion) is front-loaded.

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?

For a filtered aggregation tool with no output schema, the description is fully self-sufficient: it specifies input parameters (via schema), grouping options with default, return row structure, sort order, and missing-data behavior. An agent has everything needed to invoke it correctly and interpret results without additional guessing.

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% — all three parameters (to, from, group_by) are fully described in the schema, including enum values and defaults. The description's group_by explanation ('year' default, 'month' -> YYYY-MM) largely restates schema content rather than adding new meaning; baseline 3 is appropriate since the schema does the heavy lifting.

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 aggregation: 'Revenue (sum of orders.total_amount) EXCLUDING cancelled orders, grouped by period.' The verb is implicit but unmistakable, the resource (orders) and computation (sum of total_amount) are precise, and the cancellation filter plus time-grouping clearly separates it from entity-breakdown siblings like top_categories_by_revenue and raw-data siblings like get_orders.

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

Usage Guidelines3/5

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

Usage context is implied by the name and grouping semantics — an agent can infer this is for revenue-over-time analysis and that entity-level revenue alternatives exist among siblings. However, no explicit when-to-use or when-not-to-use guidance is given; the description never names top_categories_by_revenue or top_customers_by_spend as the entity-breakdown alternatives, so routing relies entirely on inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/victorshevtsov/shop-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server