Skip to main content
Glama

Best and slowest sellers

get_top_items
Read-onlyIdempotent

Best-selling items by takings (units, takings, orders) for a period, default the last 30 days. With order='worst', items on the menu now that sold least, for menu clean-ups.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_top_items"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast day, YYYY-MM-DD, included. Overrides period.
cafeNoWhich café, by name or slug. Only needed when the person has more than one (see list_my_cafes).
fromNoFirst day, YYYY-MM-DD. Overrides period.
limitNoHow many items, default 10.
orderNobest (default) or worst sellers.
branchNoOne branch (location) by name or id. Leave out for the whole business.
periodNoA named period on the café's clock. Weeks start Monday.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile needs no restating. The description does add genuine behavior beyond them: the 30-day default window and the important scoping fact that order='worst' only considers items currently on the menu. It says nothing about ordering of results, tie-breaking, or what happens with zero sales, which are gaps an agent may hit.

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?

Two sentences, no filler. The primary mode and its default come first, and the alternate mode is introduced in a subordinate clause with its purpose attached.

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 seven-parameter, fully-optional read tool with no output schema, the description covers the returned fields, the default period, and the semantics of the mode switch. Remaining unknowns (result ordering, behavior on zero-sales items, aggregation across branches) are modest but not stated.

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%, so the baseline is 3 and the schema already documents every parameter including the from/to override behavior and the default limit of 10. The description adds real meaning only for two things: the period default (last 30 days) and the restricted population used by order='worst'. Those are useful additions but the schema does most of the work.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb-and-resource ('Best-selling items by takings') with the metric tuple that comes back (units, takings, orders) and a default window. It also defines the second mode ('with order=worst, items on the menu now that sold least'), so an agent can tell the two behaviors apart without opening the schema. It stops short of contrasting itself with get_sales_summary, the nearest overlapping sibling.

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?

Gives a usable default ('default the last 30 days') and an explicit intent for the alternate mode ('for menu clean-ups'), which tells the agent when the worst-sellers variant is appropriate. It names no excluded cases and no sibling alternative to route to instead, so it is clear context rather than full when/when-not 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