Skip to main content
Glama
reuvenaor

Israel Statistics MCP

by reuvenaor

get_index_topics

Retrieve economic index topics from Israel's Central Bureau of Statistics, enabling users to search and filter by frequency, topic name, and language for comprehensive data analysis.

Instructions

Get index topics from Israel Statistics API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
periodNoFilter indices by update frequency. Options: M=monthly data only | Q=quarterly data only | MQ=both monthly and quarterly (most comprehensive) | QM=quarterly and monthly. Default shows all.
searchTextNoSearch for specific topics by name. For example, use 'housing' to find housing-related indices, or 'food' for food price indices.
searchTypeNoSearch matching method. Options: contains=finds text anywhere in name (recommended) | begins_with=name starts with your text | equals=exact name match. Default: contains.
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 core handler function that implements the logic for fetching index topics from the Israel Statistics API. It constructs parameters, calls secureFetch to the 'index/catalog/tree' endpoint, processes the response by counting topics, and returns structured data with a summary.
    export async function getIndexTopics(
      args?: z.infer<typeof getIndexTopicsSchema>
    ): Promise<TransformedIndexTopicsResponse> {
      const params: Record<string, string> = {
        format: "json",
        download: "false",
      }
    
      if (args?.period) params.period = args.period
      if (args?.searchText) params.q = args.searchText
      if (args?.searchType) params.string_match_type = args.searchType
    
      // Extract global parameters
      const globalParams: GlobalParams = {
        lang: args?.lang,
        page: args?.page,
        pagesize: args?.pagesize,
      }
    
      const data = await secureFetch(
        "index/catalog/tree",
        params,
        indexTopicsResponseSchema,
        globalParams
      )
      // Add statistical benefit: count topics
      const topicCount = data.chapters.flatMap((c) =>
        c.subject.flatMap((s) => s.code)
      ).length
      return { topics: data.chapters, summary: `Found ${topicCount} index codes.` }
    }
  • Zod schema defining the input shape for the get_index_topics tool, including optional parameters like period, searchText, searchType, global params (lang, page, pagesize), and explanation.
    export const getIndexTopicsSchema = z.object({
      period: periodSchema.optional(),
      searchText: z
        .string()
        .optional()
        .describe(
          "Search for specific topics by name. For example, use 'housing' to find housing-related indices, or 'food' for food price indices."
        ),
      searchType: searchTypeSchema.optional(),
      ...globalParamsSchema,
      explanation: z
        .string()
        .optional()
        .describe("Additional explanation or context for the request"),
    })
  • src/index.ts:70-86 (registration)
    Registration of the 'get_index_topics' tool in the MCP server, specifying description, input schema, and a rate-limited wrapper that calls the handler and returns JSON stringified result as text content.
      "get_index_topics",
      {
        description: "Get index topics from Israel Statistics API",
        inputSchema: getIndexTopicsSchema.shape,
      },
      withRateLimit(async (args) => {
        const result = await getIndexTopics(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 but offers minimal information. It doesn't describe what 'index topics' are, the response format, pagination behavior, error conditions, or rate limits. The description only states what the tool does at a high level without operational details.

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 a single, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a tool with well-documented parameters in the schema and gets straight to the point with zero wasted content.

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 7-parameter tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'index topics' are, how results are structured, or provide context about the Israel Statistics API domain. The agent would need to rely heavily on the parameter schema alone to understand this tool's functionality.

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 description coverage is 100%, providing comprehensive parameter documentation. The description adds no parameter-specific information beyond what's already in the schema, so it meets the baseline expectation without adding extra value. The description doesn't compensate for any gaps because there are none in the schema.

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') and resource ('index topics from Israel Statistics API'), making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_all_indices' or 'get_chapter_topics', but the specific focus on 'topics' provides some implicit 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 like 'get_all_indices' or 'get_chapter_topics'. It doesn't mention prerequisites, appropriate contexts, or exclusions, leaving the agent to infer usage from the tool name alone.

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