Skip to main content
Glama
reuvenaor

Israel Statistics MCP

by reuvenaor

get_all_indices

Retrieve all price indices from Israel's Central Bureau of Statistics with optional filtering by category, language selection, and pagination controls.

Instructions

Get all indices by different bases with optional chapter filtering 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.
chapterNoIndex category filter. Options: a=Consumer Price Index (groceries, retail) | aa=Housing Market Index | b=Producer Price Index Industrial | ba=Producer Price Index Exports | bb=Producer Price Index Services | c=Residential Building Input | ca=Commercial Building Input | d=Road Construction Input | e=Agriculture Input | f=Bus Input | fa=Public Minibus Input. Leave empty for all.
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 main asynchronous handler function that executes the 'get_all_indices' tool logic. It constructs API parameters, fetches data using secureFetch from 'index/data/price_all', counts total indices, handles housing warnings, and returns the indices data with a summary.
    export async function getAllIndices(
      args?: z.infer<typeof getAllIndicesSchema>
    ) {
      const params: Record<string, string> = {
        format: "xml",
        download: "false",
      }
    
      if (args?.oldFormat) params.oldformat = "true"
      if (args?.chapter) params.chapter = args.chapter
    
      // Extract global parameters
      const globalParams: GlobalParams = {
        lang: args?.lang,
        page: args?.page,
        pagesize: args?.pagesize,
      }
    
      const data = await secureFetch(
        "index/data/price_all",
        params,
        allIndicesResponseSchema,
        globalParams
      )
    
      // Check for housing-related warnings
      const housingWarning = checkHousingWarnings(args?.chapter)
      const chapterFilter = args?.chapter ? ` for chapter ${args.chapter}` : ""
    
      // Count total indices across all chapters
      const totalIndices = data.indices.chapter.reduce((total, chapter) => {
        return (
          total +
          (chapter.month?.reduce((monthTotal, monthData) => {
            return monthTotal + monthData.index.length
          }, 0) || 0)
        )
      }, 0)
    
      const baseSummary = `Retrieved ${totalIndices} indices${chapterFilter}.`
    
      return {
        indices: data.indices,
        summary: addHousingWarningsToSummary(baseSummary, housingWarning),
      }
    }
  • Zod schema defining the input parameters for the 'get_all_indices' tool, including optional oldFormat, chapter filter, global params like lang/page/pagesize, and explanation.
    export const getAllIndicesSchema = z.object({
      oldFormat: oldFormatSchema.optional(),
      chapter: chapterSchema.optional(),
      ...globalParamsSchema,
      explanation: z
        .string()
        .optional()
        .describe("Additional explanation or context for the request"),
    })
  • src/index.ts:226-244 (registration)
    Registration of the 'get_all_indices' tool in the MCP server, specifying the name, description, input schema, and a rate-limited wrapper around the handler function.
    server.registerTool(
      "get_all_indices",
      {
        description:
          "Get all indices by different bases with optional chapter filtering from Israel Statistics API",
        inputSchema: getAllIndicesSchema.shape,
      },
      withRateLimit(async (args) => {
        const result = await getAllIndices(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 the full burden of behavioral disclosure. While it mentions 'optional chapter filtering', it doesn't describe important behavioral aspects: whether this is a read-only operation, what format the results come in, whether there are rate limits, authentication requirements, or what happens with large result sets beyond the pagination parameters 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 a single, efficient sentence that communicates the core purpose without unnecessary words. It's appropriately sized for what it does convey, though it could be more front-loaded with critical usage information given the lack of annotations and sibling tool 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?

For a tool with 6 parameters, no annotations, and no output schema, the description is insufficient. It doesn't explain what 'indices' are in this context, what format the results will be in, or how this comprehensive tool relates to the many sibling tools. The agent would struggle to understand when and how to use this tool effectively without additional context.

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 schema has 100% description coverage, so all parameters are well-documented in the structured schema. The description adds minimal value beyond what's already in the schema - it mentions 'optional chapter filtering' which corresponds to the 'chapter' parameter, but doesn't provide additional semantic context beyond what the schema already explains thoroughly.

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 action ('Get all indices') and resource ('from Israel Statistics API'), with additional context about 'different bases' and 'optional chapter filtering'. However, it doesn't explicitly differentiate this tool from its siblings like 'get_main_indices' or 'get_index_data', which appear related but have different purposes.

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. With multiple sibling tools like 'get_main_indices', 'get_main_indices_by_period', and 'get_index_data', there's no indication of how this comprehensive 'get all indices' tool differs from those more specific tools or when an agent should choose one over another.

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