Skip to main content
Glama

Japan municipality code lookup

jp_municipality
Read-only

Which code does this Japanese municipality have on a date (default today)? Give a 5/6-digit code, or prefecture and name (old names OK). Returns status mapped / split_candidates / unknown / invalid, the valid code with English and Japanese names, change type and date (merger, incorporation, division, designated city, name change), confirmed JMA warning areas only, and J-LIS convenience-store certificate availability for 8 certificate types. Facts only, from e-Stat LOD (CC BY 4.0) and J-LIS.

Input Schema

NameRequiredDescriptionDefault
codeNoMunicipality code: 5 digits, or 6 digits including the check digit (e.g. 22131 or 221317).
nameNoMunicipality or ward name in Japanese (old names accepted; a ward may be prefixed with its city) or its e-Stat English name (e.g. "Naka-ku", "Hamamatsu-shi"). Use with prefecture.
as_ofNoYYYY-MM-DD. The date the answer is for (default: today in Japan time).
prefectureNoJapanese prefecture: English name (e.g. "Tokyo", "Osaka", "Hokkaido"; "Tokyo-to" and "Osaka Prefecture" also work), Japanese name in kanji, or JIS code "01".."47". Use with name.

Output Schema

NameRequiredDescriptionDefault
as_ofYes
inputYesThe query as understood (code or prefecture and name, and as_of).
termsYesURL of the terms of service.
sourceYes
statusYesmapped / split_candidates / unknown / invalid.
changesYes
disclaimerYes
provenanceYesFreshness receipts for every upstream source used.
as_of_codesYesCodes valid on as_of, with names, JMA area and J-LIS certificate availability.
license_noteYes
out_of_scopeYes
responded_atYes
retrieved_atYes
checked_scopeYes
status_valuesYes
national_rulesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "as_of": {
      +      "type": "string"
      +    },
      +    "as_of_codes": {
      +      "description": "Codes valid on as_of, with names, JMA area and J-LIS certificate availability.",
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "convenience_store_certificates": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "status": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "status"
      +            ],
      +            "type": "object"
      +          },
      +          "jma_area": {
      +            "additionalProperties": {},
      +            "properties": {},
      +            "type": "object"
      +          }
      +        },
      +        "required": [
      +          "code",
      +          "jma_area",
      +          "convenience_store_certificates"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "changes": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {},
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "checked_scope": {
      +      "type": "string"
      +    },
      +    "disclaimer": {
      +      "type": "string"
      +    },
      +    "input": {
      +      "additionalProperties": {},
      +      "description": "The query as understood (code or prefecture and name, and as_of).",
      +      "properties": {
      +        "as_of": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "as_of"
      +      ],
      +      "type": "object"
      +    },
      +    "license_note": {
      +      "type": "string"
      +    },
      +    "national_rules": {},
      +    "out_of_scope": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "provenance": {
      +      "description": "Freshness receipts for every upstream source used.",
      +      "items": {
      +        "additionalProperties": {},
      +        "description": "Freshness receipt for one upstream source.",
      +        "properties": {
      +          "content_sha256": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "fetch_status": {
      +            "description": "found / empty / stale / unavailable / unsupported (see catalog fetch_status_values).",
      +            "enum": [
      +              "found",
      +              "empty",
      +              "stale",
      +              "unavailable",
      +              "unsupported"
      +            ],
      +            "type": "string"
      +          },
      +          "parser_version": {
      +            "type": "string"
      +          },
      +          "processed_by": {
      +            "type": "string"
      +          },
      +          "retrieved_at": {
      +            "description": "When this service retrieved the upstream data (null if unknown).",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "source": {
      +            "additionalProperties": {},
      +            "description": "Publisher and URL of the upstream document or dataset.",
      +            "properties": {
      +              "publisher": {
      +                "type": "string"
      +              },
      +              "url": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "publisher",
      +              "url"
      +            ],
      +            "type": "object"
      +          },
      +          "upstream_updated_at": {
      +            "description": "Update time stated by the upstream, or null when it states none.",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "source",
      +          "upstream_updated_at",
      +          "retrieved_at",
      +          "content_sha256",
      +          "parser_version",
      +          "fetch_status",
      +          "processed_by"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "responded_at": {
      +      "type": "string"
      +    },
      +    "retrieved_at": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "source": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "mapped / split_candidates / unknown / invalid.",
      +      "enum": [
      +        "mapped",
      +        "split_candidates",
      +        "unknown",
      +        "invalid"
      +      ],
      +      "type": "string"
      +    },
      +    "status_values": {
      +      "additionalProperties": {
      +        "type": "string"
      +      },
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "terms": {
      +      "description": "URL of the terms of service.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "input",
      +    "status",
      +    "as_of",
      +    "as_of_codes",
      +    "changes",
      +    "national_rules",
      +    "out_of_scope",
      +    "status_values",
      +    "disclaimer",
      +    "checked_scope",
      +    "source",
      +    "license_note",
      +    "provenance",
      +    "retrieved_at",
      +    "responded_at",
      +    "terms"
      +  ],
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.8/5.0
Behavior4/5

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

With only readOnlyHint=true in annotations, the description carries meaningful extra weight: it enumerates the possible status outcomes (mapped / split_candidates / unknown / invalid), qualifies that only 'confirmed JMA warning areas' are returned, and cites the data provenance (e-Stat LOD CC BY 4.0 and J-LIS). This is genuine behavioral context beyond the annotation, though the output schema already covers the return shape.

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 core purpose question is front-loaded, followed by compact input guidance and a single dense sentence covering outputs, scope, and provenance. Every sentence contributes; there is no filler.

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

Completeness4/5

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

An output schema exists so return values need not be spelled out, and the description still notes statuses, scope limits, and data sources. Combined with 100% schema coverage and a read-only annotation, it gives an agent enough to call the tool correctly; only sibling routing is missing.

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?

Schema description coverage is 100%, so all four parameters are already documented in the schema, including code format, name handling, and prefecture formats. The description largely restates the schema ('old names OK', 5/6-digit code) without adding syntax or format meaning, so the baseline 3 applies.

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 opening question 'Which code does this Japanese municipality have on a date' names a specific resource (municipality code) and the resolution task, so an agent immediately understands it is a lookup tool. It does not explicitly name or differentiate from the sibling jp_municipality_batch, which is the one clear gap.

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

Usage Guidelines3/5

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

The description tells the agent which input forms are accepted ('a 5/6-digit code, or prefecture and name (old names OK)'), which is useful boundary info, but gives no explicit when-to-use vs when-not guidance or routing to the batch/trip-impact siblings. Usage is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources