Skip to main content
Glama

Japan Agent API

Japan municipality code lookup

jp_municipality
Read-only

Look up one Japanese municipality code as of 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

TableJSON 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

TableJSON 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

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources