Skip to main content
Glama

anomalia_offerte_calculator

Read-onlyIdempotent

[Deterministic public procurement algorithm. Pure calculation, read-only, side-effect free]. Calculates tender anomaly threshold and 10% wing-trimming arithmetic exclusion under Art. 110 D.Lgs 36/2023 and Annex II.2 (Method A and Method B) for public tenders awarded on lowest price criterion. Usage: Use this tool when evaluating bidder discount offers to determine automatic exclusion or anomaly evaluation thresholds. Returns: JSON object with { anomalyThresholdPercentage: number, trimmedOffersCount: number, anomalousOffersCount: number, methodUsed: 'METODO_A' | 'METODO_B', admittedOffers: number[], cutThresholdHigh: number, cutThresholdLow: number }.

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": "anomalia_offerte_calculator"
  }
}

Input Schema

NameRequiredDescriptionDefault
methodNoCalculation method from Annex II.2 (default METODO_A)
metodoSceltoNoItalian alias for method
prezzoBaseGaraEurNoItalian alias for tenderBasePriceEur
ribassiPercentualiNoItalian alias for discountPercentages
tenderBasePriceEurNoTender base value in EUR for absolute award calculations
discountPercentagesNoArray of percentage discount offers admitted (e.g. [12.5, 14.2, 10.0, 18.5, 22.1])

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / metodoScelto / description
      Previous value: -"Alias for method"New value: +"Italian alias for method"
    • addedInput schema / properties / metodoScelto / enum
      Added value: +[
      +  "METODO_A",
      +  "METODO_B"
      +]
    • addedInput schema / properties / metodoScelto / type
      Added value: +"string"
    • changedInput schema / properties / prezzoBaseGaraEur / description
      Previous value: -"Alias for tenderBasePriceEur"New value: +"Italian alias for tenderBasePriceEur"
    • changedInput schema / properties / ribassiPercentuali / description
      Previous value: -"Alias for discountPercentages"New value: +"Italian alias for discountPercentages"
  2. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, so the 'pure calculation, side-effect free, deterministic' framing is reinforcement rather than new information. The genuinely additive part is the enumerated return object, which substitutes for the missing output schema and tells the agent exactly which fields to expect. Nothing is said about error behavior or degenerate inputs such as an empty discount list.

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?

Three labeled blocks (purpose bracket, Usage, Returns) with the key constraint front-loaded and no wasted prose. The bracketed metadata is slightly noisy but pays for itself by conveying determinism up front.

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 no output schema, the description usefully enumerates the return fields, and the legal/method context grounds the calculation. The main remaining gap is parameter interaction (aliases, all-optional schema, default method), which an agent must infer from the schema alone.

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 every parameter is already documented. The description only mentions Method A/B, which the schema already covers via enum descriptions; it adds no guidance on the English/Italian alias duplication or which of the six optional parameters must actually be supplied.

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 ('Calculates tender anomaly threshold and 10% wing-trimming arithmetic exclusion') and pins the legal basis (Art. 110 D.Lgs 36/2023, Annex II.2, Methods A/B) plus the scope restriction to lowest-price-criterion tenders. That is far more discriminating than the sibling names suggest is needed.

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 'Usage' line gives a clear triggering condition: use it when evaluating bidder discount offers to determine exclusion or anomaly thresholds. It does not name an alternative tool or state when NOT to use it (e.g. non-lowest-price criteria are only implied by the purpose sentence).

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