Skip to main content
Glama

get_top_products

Retrieve best-selling products ranked by units sold with revenue per product, excluding cancelled orders. Use for product sales rankings without writing joins.

Instructions

Get the best-selling products ranked by units sold, with revenue per product. Cancelled orders are excluded. Use this for 'best-selling products' questions instead of writing the order_items→products join yourself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
Behavior4/5

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

Since no annotations are present, the description carries the full behavioral disclosure burden. It delivers key behavioral details: the ranking basis is units sold, revenue per product is included, and cancelled orders are excluded—these are non-obvious and useful. It does not mention where the list is the entire pop-Nand any caveats, but for a simple read-list the core is covered.

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 two short sentences: the first fixes the core behavior and the second adds the usage and the exclusion nuance. Everything present earns its place, and important info is front-loaded.

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?

After reading the description, an agent understands what the tool returns, what is excluded, and when to call it. The main missing piece—then number of results limit—is the same parameter gap. There is no output schema, but the description defines what a row contains (units sold and revenue), so an agent has enough to use it.

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

Parameters2/5

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

With schema description coverage at 0%, the description needed to compensate by explaining the single limit parameter—it doesn't mention limit at all. An agent must rely on the property name and the numeric constraints to infer that limit probably controls how many products are returned. That is a significant gap for the only parameter in the tool.

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 starts with a specific verb and resource ('Get the best-selling products') and clarifies the meaning: ranked by units sold, with revenue per product. It also states a non-obvious scope detail—cancelled orders are excluded—which makes the purpose unambiguous. This clearly separates the tool from siblings such as get_top_customers or list_tables.

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 tool for 'best-selling products' questions, and calls out the alternative: writing the order_items→products join yourself. This gives an agent both a positive trigger and a reason not to hand-write the query. It does not name the sibling get_top_customers or list exclusion conditions, which keeps it from a 5.

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