Skip to main content
Glama

revenue_by_year

Get total revenue for any year by summing completed and shipped orders. If no qualifying orders exist for that year, revenue defaults to zero with a note.

Instructions

Return total revenue for a single year (a 4-digit integer, e.g. 2025). Revenue is SUM(orders.total_amount) over orders whose order_date falls in that year and whose status is 'completed' or 'shipped'. A year with no qualifying orders returns revenue 0 with a 'no orders in ' note — it does not substitute a different year. An invalid year returns an error.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
yearYes
Behavior5/5

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

With no annotations, the description carries the full burden of disclosure, and it succeeds: it defines the exact aggregation, the status filter, and the edge cases. Specifically, it states that a year with no qualifying orders returns 0 with a note instead of substituting a different year, and that invalid years return an error.

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 no redundant framing. Every sentence adds distinct value: return semantics, aggregation logic, and edge-case behavior. The most central result ('total revenue for a single year') 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 one-parameter query tool with no output schema or annotations, the description is complete: it specifies the request semantics, the denominator filter, the zero-result case, and the failure case. An agent can predict behavior without any other documentation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must explain 'year' beyond 'integer' it does. The example '2025', the '4-digit integer' constraint, and the invalid-year error behavior give an agent the validation and expected input semantics it needs.

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 opens with a specific verb and resource ('Return total revenue for a single year') and gives the exact computation semantics (SUM(orders.total_amount), order_date, status filter). This scoping distinguishes it from the sibling revenue_by_category and from the customer/country tools without needing to open 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 Guidelines4/5

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

The description makes clear that this tool is for single-year revenue queries and unobtrusively implies the contrast with revenue_by_category. It does not explicitly name alternatives or give when-not-to-use conditions, but the single-year scoping gives agents enough context to select it appropriately.

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/ablinovsibset-spec/internet-shop-mcp'

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