Skip to main content
Glama

Index-linkage calculator (הצמדה למדד)

calculate_linked_amount

Adjusts an amount by a CBS price index (e.g. CPI) between two dates or months to compute index-linked rent, alimony, or loan balances, with an optional no-decrease floor.

Instructions

Adjust an amount by a CBS index between two points in time, e.g. rent, alimony, a contractor payment or a loan balance linked to the CPI or to the residential building inputs index (200010). Two methods: (1) from_month/to_month — the actual index of those months (מדד בגין), computed from published values and CBS chaining coefficients, in either direction; (2) from_date/to_date — the index known on each date (המדד הידוע: month M is known from the 16th of M+1), via the official CBS calculator. no_decrease keeps the original amount when the index fell (a common contract floor). Returns the linked amount, factor, change_pct, both index values with bases and the chaining coefficient.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "amount": "<amount>"
    },
    "name": "calculate_linked_amount"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoCBS index code, e.g. 120010 for the headline CPI (find codes with search_indices)
amountYesAmount to adjust, e.g. 5000
to_dateNoTarget date, YYYY-MM-DD (method 2). Defaults to today; future dates are rejected
to_monthNoTarget index month, YYYY-MM (method 1). Defaults to the latest published
from_dateNoBase date, YYYY-MM-DD (method 2)
from_monthNoBase index month, YYYY-MM (method 1)
no_decreaseNoNever return less than the original amount (index floor). Default false

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral burden and does well: it explains the two calculation methods, the known-index timing rule, chaining coefficients, and the no_decrease floor. It does not discuss failure modes such as future-date rejection, but that is already documented in the schema.

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 description is dense but front-loaded: it states the core calculation first, then the two methods, then the no_decrease behavior and return fields. It avoids obvious filler, though the single long paragraph could be more scannable.

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?

For a 7-parameter calculator with no output schema and no annotations, the description covers the essential semantics: method selection, known-index timing, the no_decrease floor, and the returned fields. It is nearly complete, with only minor gaps around error behavior and defaults already covered by the schema.

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 description coverage is 100%, so the baseline would be 3, but the description adds method-level meaning to the month versus date parameters and contextualizes no_decrease as a contract floor. The schema remains the primary source for individual parameter formats and defaults.

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 verb and resource: adjust an amount by a CBS index between two points in time. It distinguishes this calculation task from the index-lookup siblings and even points to search_indices for finding codes.

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?

It clearly explains the two calculation methods and when each applies: month-based (מדד בגין) versus date-based (המדד הידוע). It also names the no_decrease contract-floor option, though it does not explicitly exclude other scenarios or mention alternatives beyond search_indices.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.