Skip to main content
Glama

Costs above price

get_cost_above_price
Read-onlyIdempotent

Variants sold in the period whose recorded unit cost is at or above their list price without VAT — a cost Nuira does not believe, so it estimates it instead: label, realisedUnitPrice (what it actually sold at), listPrice and listPriceExVat, recordedUnitCost (on the order) and catalogueCost (in Shopify now), units, the cogs counted for them and costedRevenue. state check_cost = the cost in Shopify still looks wrong, fix it there; corrected = the catalogue has been fixed since. windowCogs is the period's whole COGS, to size the problem. Use for 'are my costs right', 'why is the margin of product X so low', or 'which products sell below cost'. Optional from and to (inclusive YYYY-MM-DD, both or neither, never after today) read another span instead of the default period. A named month, a week or two dates the operator gave MUST be sent here: without them this reads the default period (the one on the operator's screen, else the last 30 days), which is not that month. When the operator names no period, send neither.

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_cost_above_price"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoLast day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days.
fromNoFirst day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / from / description
      Previous value: -"First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default 30-day period."New value: +"First day of the span, inclusive, as YYYY-MM-DD. Send together with `to`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days."
    • changedInput schema / properties / to / description
      Previous value: -"Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default 30-day period."New value: +"Last day of the span, inclusive, as YYYY-MM-DD; not after today. Send together with `from`, or omit both to read the default period: the one on the operator's screen when the message names it, else the last 30 days."
  2. Added

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 and closed-world, so the bar is lower; the description still adds real behavior: the cost is distrusted and estimated rather than reported verbatim, the `state` values (check_cost vs corrected) are explained with the action each implies, and windowCogs is framed as the period-wide COGS used to size the problem. It does not discuss pagination or result volume, which keeps it off a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose and the returned-field inventory are front-loaded, and the period rule is placed at the end where it belongs. The first sentence is very long and chains several clauses with em-dashes, so it is dense but not padded; every clause carries information.

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?

With no output schema, the description carries the return-shape burden and does so by listing each field and its meaning, plus the state semantics and the windowCogs context metric. For a two-optional-parameter read tool with a non-obvious default-period rule, an agent has everything needed to call it and interpret the result.

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% and the schema already documents from/to, inclusive YYYY-MM-DD, and the default-period fallback, so the description largely parallels it. It does add operational meaning beyond the schema: both-or-neither coupling, never after today, and the fact that omitting them reads the operator's on-screen period rather than the month they asked about.

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 names a precise resource and predicate: variants sold in the period whose recorded unit cost is at or above list price without VAT. It goes further by enumerating the returned fields (realisedUnitPrice, recordedUnitCost, catalogueCost, units, cogs, costedRevenue), which makes it unmistakable against siblings like get_margin_trend or get_product_board.

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?

It gives explicit trigger phrases ('are my costs right', 'why is the margin of product X so low', 'which products sell below cost') and a hard routing rule: a named month, week or explicit date pair MUST be sent here, while no named period means send neither. That is when-to-use plus when-not-to-pass-parameters, stated without 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.

Resources