Skip to main content
Glama
jpzip

jpzip MCP server

Official
by jpzip

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

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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.' });
    }
  • 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;
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, but the description lists all returned metadata fields, giving full transparency for a read-only operation.

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?

Two concise sentences with no fluff, directly stating action and output.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with no output schema, the description fully explains the return structure (version, timestamp, counts), making it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has no parameters, so no additional parameter info is needed; the description suffices.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns dataset metadata (version, timestamp, counts) with specific fields, leaving no ambiguity.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes 'Useful for confirming the dataset is current,' which implies when to use it, though it does not explicitly exclude alternatives.

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/jpzip/mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server