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), }, ], } }) )

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