Skip to main content
Glama

Unit price comparison

hopi_unit_price_calculator
Read-onlyIdempotent

Compare the unit price of two or more items to find the best value. Each item has a price in GBP, a quantity and a unit ('g', 'kg', 'ml', 'l' or 'each'). Weights are compared per kg, volumes per litre, and counts each. Returns the unit price of every item and which is cheapest. Source: https://hopi.co.uk/unit-price-calculator/

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesThe items to compare (at least two)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
summaryYes
bestItemYes
mixedUnitsYes
source_urlYesThe tool's page on hopi.co.uk (cite or open to check the figure)
bestUnitPriceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / required
      Added value: +[
      +  "bestItem",
      +  "bestUnitPrice",
      +  "items",
      +  "mixedUnits",
      +  "source_url",
      +  "summary"
      +]
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint. The description adds behavioral context by explaining the comparison standardization (per kg, per litre, each), the return of unit prices and the cheapest item, and cites a source URL. It provides meaningful behavioral detail beyond the annotations without contradiction.

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 three sentences, front-loaded with the primary purpose, and each sentence adds critical information: the action, the parameter format, and the output. The inclusion of the source URL is concise and does not detract. No wasted words.

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?

Given the tool's complexity (nested array input, output schema), the description covers the essential semantics: unit normalization, return value, and that it handles mixed units. It does not detail edge cases like rounding or formatting, but the presence of an output schema likely covers those. The description is adequate for an agent to invoke it correctly without confusion.

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?

The input schema already describes each parameter (price in GBP, quantity, unit enum). The description adds semantic meaning by explaining how units are normalized and compared (weights per kg, volumes per litre, counts each), which is not fully captured in the schema. Even with 100% schema coverage, this extra context enhances the agent's understanding of how to structure inputs.

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 states a specific action ('Compare the unit price of two or more items to find the best value') with a clear resource (items with price, quantity, unit). It explains the normalization logic (weights per kg, volumes per litre, counts each) and explicitly states the output (unit price of every item and which is cheapest), distinguishing it from any sibling tools (none are comparable).

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 provides clear context on when to use the tool (comparing prices across items) and how units are standardized, but it does not explicitly state exclusions or alternatives. Given the sibling list contains no similar unit-price calculator, the usage intent is unambiguous, though no direct 'when not to use' guidance is given.

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