Skip to main content
Glama

Get product ranking

get_product_ranking
Read-onlyIdempotent

Rank the open task's lines in one named category or supplier by revenue or units, highest first. Use it to compare rate of sale within that group. It refuses an unfiltered ranking, because the top of the open lines is not the top of the business; use twelfth_list_products sorted by units_l4w for that.

Input Schema

NameRequiredDescriptionDefault
metricNoFigure to rank by; defaults to revenue.
categoryNoCategory name to narrow the visible lines to, as shown in the workspace.
entity_nameNoEntity name exactly as the user wrote it.

Output Schema

NameRequiredDescriptionDefault
rowsYesOne row per product line: sku, product, category, supplier, then the line's own measures.
scopeYesWhat population the rows were read from.
truncatedYesTrue when more rows matched than were returned.
populationNoPresent on an unfiltered read: a reminder the rows are a slice, not the whole business.
evidence_idYesHandle for these rows within this call's results. Not a citation.
completenessNoPresent when nothing matched: what the empty result does and does not mean.
returned_rowsYesRows in this response.
inputs_not_appliedNoInputs the snapshot could not apply.
source_evidence_idsYesWorkspace evidence IDs backing these rows. Empty when the source carries no evidence records.
total_matching_rowsYesRows that matched before any limit.
excluded_rows_without_metricNoRows left out of a ranking because they carry no figure for the metric.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / description
      Previous value: -"Rows from the current work-unit snapshot."New value: +"Rows from the current task snapshot."
  2. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, non-destructive semantics, and the description adds genuinely new behavior: results are ordered highest first, and an unfiltered call is refused, which warns the agent away from a guaranteed error. It does not discuss result limits, pagination, or what the refusal looks like, so it stops short of full behavioral coverage.

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 tight sentences: what it does, why you'd use it, then the constraint and the fallback. The critical scoping rule and the alternative are front-loaded with no filler.

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?

An output schema exists, so return values needn't be explained, and the description covers purpose, ordering, refusal behavior, and the correct alternative. The only gap is not spelling out the category-versus-entity_name relationship given that both parameters are optional in the schema.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real semantics: ranking is scoped to exactly one named group, and despite zero required parameters an unfiltered call will be rejected, effectively mandating a category or supplier filter. Minor residual ambiguity about whether category and entity_name can be combined, and the word 'supplier' versus the schema's 'entity_name'.

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?

States a specific verb and resource plus scope: ranking the open task's lines within one named category or supplier by revenue or units, highest first. It is immediately distinguishable from the sibling twelfth_list_products, which it explicitly names as the different tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

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

Gives an explicit use case (compare rate of sale within a group), an explicit exclusion (it refuses an unfiltered ranking), and an explicit alternative with the exact sort key to use instead (twelfth_list_products sorted by units_l4w). Nothing about tool selection is left to inference.

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.