Skip to main content
Glama

AICTIONBOT™ Werkbank

Spend year against year: price effect and volume effect per article, category or supplier, largest price increases first

compare_spend_periods
Read-onlyIdempotent

Takes spend rows of two years or periods and groups them by article, otherwise by category, otherwise by supplier. Where quantities are given it separates the price effect (same volume, different price per unit) from the volume effect (bought more or less), and shows new and dropped entries separately. Lists the entries with the largest price increase first, with old and new price per unit, and ends with the next step. Without quantities only the amounts are compared. Traffic light by the share of pure price increase in last year's spend (over 5 percent red, over 1 percent yellow). Pass two arrays (old_rows for the previous year, new_rows for the current year) or one array rows with a year column. To check a single announced price increase against official indices use check_price_increase. Licence, or one free check every 30 days.

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

Input Schema

NameRequiredDescriptionDefault
rowsNoAlternative to old_rows and new_rows: one list with a year column (for example 2025 and 2026) plus the columns above.
languageNoLanguage of the answer. Default de.
new_rowsNoCurrent year with the same columns.
old_rowsNoPrevious year: article (or category or supplier), quantity (optional), amount. German column names work too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses grouping fallback precedence, output ordering (largest price increase first), the traffic-light thresholds (>5% red, >1% yellow), and the licence/free-check-per-30-days limit. The only soft spot is the vague closing 'ends with the next step', which names a section without describing it.

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?

Information-dense and front-loaded with the core purpose before the input mechanics and caveats. The sentences are long and stack many clauses, and phrases like 'ends with the next step' are padding, but almost every clause carries real content.

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 itself and does so: entry ordering, the reported fields (old and new price per unit), the traffic-light coding, and separate handling of new and dropped entries. Enough for an agent to call it correctly 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?

With 100% schema coverage the baseline is 3, but the description adds genuine meaning: it explains that quantity is optional and that omitting it degrades the comparison to amounts only, which the schema does not convey. It also clarifies that German column names are accepted and that a year column is required in the single-array mode.

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?

Names a specific verb and resource (compare spend across two periods, grouped by article, else category, else supplier) and explicitly separates price effect from volume effect. It also distinguishes itself from the sibling check_price_increase, so an agent can tell them apart without opening a schema.

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?

States the input shape alternatives (two arrays old_rows/new_rows, or one rows array with a year column) and gives an explicit exclusion: for a single announced price increase against official indices, use check_price_increase instead. The licence/free-check caveat further clarifies practical usage conditions.

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.