Skip to main content
Glama

MaCalculatriceEnLigne

Calculate Unit Price

calculate_unit_price
Read-onlyIdempotent

Compare unit prices across packages to find the best deal. Use for shopping. Inputs: list of {price, quantity, unit}. Returns price per unit and best buy. See list_bundles for related 'education' calculators.

Input Schema

NameRequiredDescriptionDefault
itemsYesItems to compare

Output Schema

NameRequiredDescriptionDefault
resultNoComputed result. Object whose fields depend on the tool (e.g. {tax, marginal_rate, brackets} for tax tools, {volume_l, gallons} for volume tools).
sourceNoAuthoritative source for the rule or formula (e.g. "Article 197 CGI", "NF DTU 21").
formulaNoHuman-readable formula or method used (e.g. "I=P·r·t", "Magnus formula").
reference_urlNoLink to a calcul2 page documenting the calculation in detail.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the safety profile is fully covered by structured data. The description adds only that it returns price per unit and best buy, which is lightweight and partly redundant with the existing output schema.

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

Conciseness3/5

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

Four short sentences front-load the purpose well, but the closing sentence about list_bundles and 'education' calculators is confusing and does not earn its place in a tool definition for a price comparator.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present and full parameter coverage, the description need not explain returns, and it covers the basic compute-and-compare behavior adequately. It is nonetheless thin on the conventions an agent needs (e.g., output unit normalization, treatment of differing units) and the trailing bundle reference muddies rather than completes the picture.

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 description coverage is 100%, so the schema already documents the single 'items' array parameter, making 3 the baseline. The description's enumeration of {price, quantity, unit} adds nothing new and omits the required 'name' field, though this is a minor imprecision.

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: comparing unit prices across packages to find the best deal. However, it does not differentiate itself from the near-identical sibling calculate_grocery_unit_comparison, nor from calculate_cost_per_use, so an agent has no basis to pick between them.

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

Usage Guidelines2/5

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

'Use for shopping' is the only usage guidance, and it is too vague to discriminate among the many cost-comparison siblings. No when-not conditions or named alternatives are given; the pointer to list_bundles is unrelated to choosing this tool.

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.