Skip to main content
Glama
reuvenaor

Israel Statistics MCP

by reuvenaor

get_main_indices

Retrieve key economic indicators and price indices from Israel's Central Bureau of Statistics, with options for language, formatting, and pagination.

Instructions

Get main indices by different bases from Israel Statistics API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
oldFormatNoSet to true if you need Hebrew text and the legacy display format. Use false (default) for English text and modern formatting.
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 that fetches main indices data from the Israel Statistics API, transforms XML response to JSON, and returns structured data including indices list, update date, and summary.
    export async function getMainIndices(
      args?: z.infer<typeof getMainIndicesSchema>
    ): Promise<TransformedMainIndicesResponse> {
      const params: Record<string, string> = {
        format: "json",
        download: "false",
      }
    
      if (args?.oldFormat) params.oldformat = "true"
    
      // Extract global parameters
      const globalParams: GlobalParams = {
        lang: args?.lang,
        page: args?.page,
        pagesize: args?.pagesize,
      }
    
      const data = await secureFetch(
        "index/data/price_selected",
        params,
        mainIndicesXmlResponseSchema,
        globalParams
      )
    
      // Transform XML data to a more usable format - handle all elements properly
      const transformedIndices = data.indices.date.flatMap((dateEntry) =>
        dateEntry.code.map((codeEntry) => ({
          code: codeEntry.code[0], // Single value per code entry
          name: codeEntry.name[0], // Single value per code entry
          percent: parseFloat(codeEntry.percent[0]), // Single value per code entry
          year: dateEntry.year[0], // Single value per date entry
          month: dateEntry.month[0], // Single value per date entry
          indices: codeEntry.index.map((idx) => ({
            value: parseFloat(idx._), // Text content, not in array
            base: idx.base[0], // Attributes are in arrays with explicitArray:true
            chainingCoefficient: idx.chainingCoefficient
              ? parseFloat(idx.chainingCoefficient[0])
              : undefined,
          })),
        }))
      )
    
      return {
        indices: transformedIndices,
        updateDate: data.indices.UpdateDate[0],
        summary: `Retrieved ${transformedIndices.length} main indices updated on ${data.indices.UpdateDate[0]}.`,
      }
    }
  • Zod input schema for the get_main_indices tool, including optional oldFormat, global pagination/language params, and explanation.
    export const getMainIndicesSchema = z.object({
      oldFormat: oldFormatSchema.optional(),
      ...globalParamsSchema,
      explanation: z
        .string()
        .optional()
        .describe("Additional explanation or context for the request"),
    })
  • src/index.ts:186-204 (registration)
    Registration of the 'get_main_indices' tool in the MCP server, specifying description, input schema, and handler execution wrapped with rate limiting.
    server.registerTool(
      "get_main_indices",
      {
        description:
          "Get main indices by different bases from Israel Statistics API",
        inputSchema: getMainIndicesSchema.shape,
      },
      withRateLimit(async (args) => {
        const result = await getMainIndices(args)
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(result),
            },
          ],
        }
      })
    )
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions retrieving data but doesn't disclose behavioral traits such as whether this is a read-only operation, potential rate limits, authentication needs, or what the response format looks like. For a tool with no annotations, this is a significant gap in transparency.

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 a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized and front-loaded, though it could be slightly more informative to earn a higher score.

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 no annotations, no output schema, and 5 parameters, the description is incomplete. It doesn't explain what 'main indices' or 'different bases' are, how results are structured, or any behavioral context. For a data retrieval tool with multiple parameters, this leaves significant gaps for an agent.

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 all 5 parameters thoroughly. The description adds no additional meaning beyond what's in the schema, such as explaining 'different bases' in relation to parameters. Baseline 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Get main indices by different bases from Israel Statistics API' which provides a clear verb ('Get') and resource ('main indices'), but it's vague about what 'different bases' means and doesn't distinguish from siblings like 'get_all_indices' or 'get_main_indices_by_period'. The purpose is understandable but lacks specificity for sibling differentiation.

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?

No guidance is provided on when to use this tool versus alternatives like 'get_all_indices' or 'get_main_indices_by_period'. The description mentions 'by different bases' but doesn't explain what this entails or how it differs from other tools, leaving the agent without clear usage context.

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