Skip to main content
Glama

get_revenue_report

Retrieve total revenue grouped by product category, year, or month, excluding cancelled orders. Optionally filter by year to narrow results.

Instructions

Get total revenue grouped by product category, by year, or by month. Cancelled orders are excluded. year optionally restricts results to one year (also applies to 'month' grouping). Use this instead of writing the orders→order_items→products join yourself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearNo
group_byYes
Behavior4/5

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

With no annotations, the description correctly discloses the key behavioral details: canceled orders are excluded, and the `year` parameter acts as an optional filter that also applies when grouping by month. It doesn't discuss auth or rate limits, but the main data-behavior message is transparent.

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 compact sentences deliver the essential info with meaningful detail; the first sentence is the core action, the second clarifies data inclusion/exclusions, and the third tells the expected alternative. No filler or repeated schema text.

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?

For a 2-parameter reporting tool with no output schema and no annotations, the description covers purpose, grouping semantics, optional filter, and usage context. Omitting the exact return format is minor because the tool is narrow and the input semantics are fully explained.

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?

The schemas has zero description coverage, so the description adequately compensates: it explains the `year` parameter in context and the three allowed grouping values in `group_by`. It doesn't need to explain the enum bodies since the schema already enumerates them, and adding meaning to parameter usage is done well.

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: it gets total revenue grouped by product category, year, or month, which is distinct from sibling tools like get_top_customers and get_top_products. It clearly tells the agent what the tool does.

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?

The description explicitly says to use this instead of writing an orders→order_items→products join yourself, which gives direct when-to-use guidance relative to the query-type workflow. It doesn't rule out all sibling tools, but this report is different enough that no exclusion is critical.

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

Install Server

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/denezhkinia/shop-db-mcp'

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