Skip to main content
Glama

Top Products by Profit

get_top_products
Read-onlyIdempotent

Get the top N products ranked by revenue, profit, margin, or units sold over a date range using the same order-based product profit math as the dashboard.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of products to return (default 10, hard-capped at 50).
rank_byYesMetric to rank products by, highest first: gross revenue, net profit after overhead allocation, net margin percentage, or units sold.
end_dateYesEnd of the date range in YYYY-MM-DD format, resolved in the tenant's timezone (inclusive).
start_dateYesStart of the date range in YYYY-MM-DD format, resolved in the tenant's timezone (inclusive).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNoPresent only when no product sales were found in the range.
_metaNo
periodNo
rank_byNo
_messageNo
productsNo
_truncatedNo
_tenant_contextNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

The read-only, idempotent, and non-destructive traits are already supplied by annotations, so the description only needs to add extra behavioral context. It does so with the clause 'using the same order-based product profit math as the dashboard,' which clarifies the exact profit methodology and promises dashboard-consistent figures. There is no contradiction with the annotations.

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?

The description is a single sentence with the action and result front-loaded: 'Get the top N products ranked...'. The final clause about dashboard math is the only elaboration and it earns its place by specifying methodology. There is no filler, repetition, or restatement of the title.

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 read-only ranked-list tool with a fully documented input schema, an output schema, and annotations covering safety, the description covers the remaining essentials: what is returned, the ranking dimensions, and the date range. Operational details such as the 50-product cap, timezone resolution, and 'highest first' ordering live in the schema, so nothing critical is missing.

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 description coverage is 100%, with start_date, end_date, limit, and rank_by all individually documented, including format, bounds, defaults, and enum values. The description only restates those concepts at a high level ('ranked by revenue, profit, margin, or units sold', 'over a date range') and does not add new parameter-level meaning. Baseline 3 is appropriate.

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: 'Get the top N products ranked by revenue, profit, margin, or units sold over a date range.' The 'top N' phrasing separates it from the sibling get_bottom_products, and the ranking-metric list makes clear this is a ranked list rather than a detail lookup like get_product_detail.

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?

The description implies usage when a ranked list is wanted, but it never states when to prefer this tool over alternatives such as get_bottom_products or get_product_detail, nor does it give any when-not-to-use conditions. An agent has to infer applicability from the name and sibling list rather than from explicit routing guidance.

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