Skip to main content
Glama
reuvenaor

Israel Statistics MCP

by reuvenaor

get_chapter_topics

Retrieve specific economic data topics from Israel's Central Bureau of Statistics by selecting a chapter category like Consumer Price Index or Housing Market Index.

Instructions

Get topics for a specific chapter from Israel Statistics API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chapterIdYesIndex 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 handler function that executes the tool logic: extracts params, fetches chapter topics via secureFetch from 'index/catalog/chapter' endpoint, adds housing warnings to summary, and returns topics array with summary.
    export async function getChapterTopics( args: z.infer<typeof getChapterTopicsSchema> ) { // Extract global parameters const globalParams: GlobalParams = { lang: args.lang, page: args.page, pagesize: args.pagesize, } const data = await secureFetch( "index/catalog/chapter", { id: args.chapterId, format: "json", download: "false" }, chapterTopicsResponseSchema, globalParams ) // Check for housing-related warnings const housingWarning = checkHousingWarnings(args.chapterId) const baseSummary = `Found ${data.subject.length} topics in chapter ${args.chapterId}.` return { topics: data.subject, summary: addHousingWarningsToSummary(baseSummary, housingWarning), } }
  • Input schema using Zod: requires chapterId (number), optional lang, page, pagesize, explanation.
    export const getChapterTopicsSchema = z.object({ chapterId: chapterSchema, ...globalParamsSchema, explanation: z .string() .optional() .describe("Additional explanation or context for the request"), })
  • src/index.ts:126-144 (registration)
    Registers the tool named 'get_chapter_topics' with the MCP server, providing description, inputSchema from getChapterTopicsSchema, and a rate-limited wrapper that calls the handler and returns JSON stringified result as text content.
    server.registerTool( "get_chapter_topics", { description: "Get topics for a specific chapter from Israel Statistics API", inputSchema: getChapterTopicsSchema.shape, }, withRateLimit(async (args) => { const result = await getChapterTopics(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