Skip to main content
Glama
reuvenaor

Israel Statistics MCP

by reuvenaor

get_index_calculator

Calculate price linkage and adjust amounts for inflation using Israel Statistics data. Convert values between dates based on index codes for accurate financial analysis.

Instructions

Calculate price linkage using Israel Statistics API index calculator

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexCodeYesThe numeric index code to use for price linkage calculation. Get this from getIndexData or getSubjectCodes first.
valueYesThe original amount in the currency you want to link/adjust for inflation. For example, 100 for 100 shekels.
fromDateYesStarting date for the linkage calculation in mm-dd-yyyy format (e.g., '01-01-2020'). This is when your original amount was valued.
toDateYesTarget date for the linkage calculation in mm-dd-yyyy format (e.g., '01-01-2024'). This shows what the amount is worth at this later date.
currencyNoCurrency type. Options: new_sheqel=current Israeli Shekel (default, most common) | old_sheqel=pre-1980s Israeli Shekel | lira=historical Israeli Lira.
langNoLanguage for response. Options: he=Hebrew (default) | en=English. Use 'en' for English responses.
pageNoPage number for pagination. Start with 1 for first page. Use with pagesize to navigate large result sets.
pagesizeNoNumber of results per page (maximum 1000). Controls how many items to return. Use with page for pagination.
explanationNoAdditional explanation or context for the request

Implementation Reference

  • The handler function implementing the core logic for the get_index_calculator tool, which fetches index calculator data from the API using secureFetch and returns formatted request, answer, and summary.
    export async function getIndexCalculator(
      args: z.infer<typeof getIndexCalculatorSchema>
    ) {
      const params: Record<string, string> = {
        value: args.value.toString(),
        date: args.fromDate,
        toDate: args.toDate,
        format: "json",
        download: "false",
      }
    
      if (args.currency) params.currency = args.currency
    
      // Extract global parameters
      const globalParams: GlobalParams = {
        lang: args.lang,
        page: args.page,
        pagesize: args.pagesize,
      }
    
      const data = await secureFetch(
        `index/data/calculator/${args.indexCode}`,
        params,
        indexCalculatorResponseSchema,
        globalParams
      )
      return {
        request: data.request,
        answer: data.answer,
        summary: `Linked ${data.request.sum} from ${data.request.from_date} to ${data.request.to_date}: ${data.answer.to_value} (${data.answer.change_percent}% change)`,
      }
    }
  • Input schema using Zod for validating parameters of the get_index_calculator tool, including indexCode, value, dates, currency, and global params.
    export const getIndexCalculatorSchema = z.object({
      indexCode: z
        .number()
        .describe(
          "The numeric index code to use for price linkage calculation. Get this from getIndexData or getSubjectCodes first."
        ),
      value: z
        .number()
        .describe(
          "The original amount in the currency you want to link/adjust for inflation. For example, 100 for 100 shekels."
        ),
      fromDate: z
        .string()
        .describe(
          "Starting date for the linkage calculation in mm-dd-yyyy format (e.g., '01-01-2020'). This is when your original amount was valued."
        ),
      toDate: z
        .string()
        .describe(
          "Target date for the linkage calculation in mm-dd-yyyy format (e.g., '01-01-2024'). This shows what the amount is worth at this later date."
        ),
      currency: currencySchema.optional(),
      ...globalParamsSchema,
      explanation: z
        .string()
        .optional()
        .describe("Additional explanation or context for the request"),
    })
  • src/index.ts:166-184 (registration)
    MCP tool registration for 'get_index_calculator', specifying description, input schema, and handler invocation wrapped in rate limiting.
    server.registerTool(
      "get_index_calculator",
      {
        description:
          "Calculate price linkage using Israel Statistics API index calculator",
        inputSchema: getIndexCalculatorSchema.shape,
      },
      withRateLimit(async (args) => {
        const result = await getIndexCalculator(args)
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result),
            },
          ],
        }
      })
    )
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It states it 'calculates price linkage' but doesn't describe what the calculation does (e.g., inflation adjustment), how it works, what the output looks like, error conditions, rate limits, or authentication needs. For a calculation tool with 9 parameters, this leaves significant behavioral gaps.

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 extremely concise at just one sentence: 'Calculate price linkage using Israel Statistics API index calculator.' It's front-loaded with the core purpose and wastes no words. Every element earns its place by establishing what the tool does and its data source context.

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

Completeness2/5

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

Given the tool's complexity (9 parameters, calculation functionality) and lack of both annotations and output schema, the description is insufficiently complete. It doesn't explain what 'price linkage' means, how the calculation works, what format the result takes, or provide any examples. For a calculation tool with this many inputs, users need more context about the operation and expected outputs.

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?

The description adds no parameter-specific information beyond what's already in the input schema, which has 100% coverage with detailed descriptions for all 9 parameters. The baseline score of 3 reflects that the schema does all the heavy lifting - the description doesn't compensate but also doesn't detract from the comprehensive schema documentation.

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?

The description clearly states the tool's purpose: 'Calculate price linkage using Israel Statistics API index calculator.' It specifies the verb ('calculate') and resource ('price linkage'), but doesn't differentiate from sibling tools like 'get_index_data' or 'get_subject_codes' which might provide related data. The purpose is specific but lacks sibling distinction.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions the Israel Statistics API context but doesn't explain when to choose this calculator over other sibling tools like 'get_index_data' for index information or 'get_all_indices' for listings. There's no mention of prerequisites, typical use cases, or exclusions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/reuvenaor/israel-statistics-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server