Skip to main content
Glama

Get sales metrics

get_sales_metrics
Read-onlyIdempotent

Read revenue, units and margin per product across the lines in the open task. One precomputed figure per product: no date series, period comparison or whole-business total. Use it to compare sales across those lines; for every measure on one named product, brand or supplier use get_entity_profile, and for products outside the open lines use twelfth_list_products.

Input Schema

NameRequiredDescriptionDefault
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.2/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent and non-destructive, so safety behavior is covered. The description adds the important output-shape trait (one precomputed figure per product, no time series or aggregate total), which genuinely prevents misfires. It says nothing further about how the filters widen or narrow the result set, so it stops short of full behavioral disclosure.

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 sentences, zero waste. What it returns is front-loaded, the limitation follows, and the routing alternatives come last in the position an agent reads while deciding. Every clause earns its place.

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?

With an output schema, full param descriptions and safety annotations, the description only needs to cover scope and routing, which it does well. The one gap is that it never says whether entity_name/category broaden or merely narrow the 'open task lines' population, leaving a small ambiguity for a contrarian-sounding filter combination.

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% and both parameters carry their own descriptions, so the schema does the heavy lifting. The description adds only indirect semantic context ('lines in the open task' as the default population), and does not clarify how category or entity_name interact with that scope. Baseline 3 applies.

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 (read) and resources (revenue, units, margin per product) and pins the scope to 'the lines in the open task'. It also states what the tool is not (no date series, period comparison or whole-business total), which separates it from the richer entity-level tools.

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?

Explicitly names the use case ('compare sales across those lines') and routes two alternative needs to named siblings: get_entity_profile for all measures on one product/brand/supplier, twelfth_list_products for products outside the open lines. Both condition and destination are given, nothing 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.