get_metadata
Retrieve jpzip dataset metadata including version, timestamp, total entries, and per-prefecture counts to confirm data currency.
Instructions
Return the jpzip dataset metadata: data version (YYYY-MM), generated timestamp, total entry count, and per-prefecture counts. Useful for confirming the dataset is current.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:110-113 (handler)Request handler for the 'get_metadata' tool. Calls client.getMeta() on the JpzipClient and returns the dataset metadata (version, timestamp, entry counts) or an error if unavailable.
case 'get_metadata': { const meta = await client.getMeta(); return toolResult(meta ?? { error: 'meta.json is not available from the CDN.' }); } - src/index.ts:75-83 (schema)Tool schema definition for 'get_metadata'. Describes the tool and declares an empty input schema (no arguments required).
{ name: 'get_metadata', description: 'Return the jpzip dataset metadata: data version (YYYY-MM), generated timestamp, total entry count, and per-prefecture counts. Useful for confirming the dataset is current.', inputSchema: { type: 'object', properties: {}, }, }, - src/index.ts:23-84 (registration)Tool registration: 'get_metadata' is listed in the TOOLS array and exposed to clients via the ListToolsRequestSchema handler.
const TOOLS = [ { name: 'lookup_zipcode', description: 'Look up the Japanese address for a 7-digit postal code (郵便番号). Returns prefecture, city, and town(s) in kanji, katakana, and romaji, plus the JIS prefecture code and Soumu city code. Hyphens in the input are allowed.', inputSchema: { type: 'object', properties: { zipcode: { type: 'string', description: '7-digit postal code, e.g. "2310017" or "231-0017".', }, }, required: ['zipcode'], }, }, { name: 'search_by_address', description: 'Search for postal codes by free-text address query. Matches against prefecture, city, and town in kanji, katakana, or romaji (case-insensitive substring match, whitespace ignored). First call in a session downloads the full dataset (~25MB) into memory; subsequent calls within the same session are instant.', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Address keyword, e.g. "横浜市中区本町" / "ヨコハマシナカクホンチョウ".', }, limit: { type: 'integer', description: 'Maximum number of hits to return (default 20).', minimum: 1, maximum: 200, }, }, required: ['query'], }, }, { name: 'list_cities_in_prefecture', description: 'List all municipalities (city / ward / town / village) in a Japanese prefecture, with their Soumu city codes. Prefecture name accepts kanji, katakana, or romaji. Shares the same in-memory dataset as search_by_address.', inputSchema: { type: 'object', properties: { prefecture: { type: 'string', description: 'Prefecture name, e.g. "神奈川県" / "カナガワケン" / "Kanagawa".', }, }, required: ['prefecture'], }, }, { name: 'get_metadata', description: 'Return the jpzip dataset metadata: data version (YYYY-MM), generated timestamp, total entry count, and per-prefecture counts. Useful for confirming the dataset is current.', inputSchema: { type: 'object', properties: {}, }, }, ] as const;