Skip to main content
Glama
uedayou

loa-mcp-server

by uedayou

複数住所の位置(ポリゴン/ポイント)をまとめて取得(地図・アプリをその場で作る場合は必ずこちら)

get_address_locations

Batch geocode multiple Japanese addresses into a single GeoJSON FeatureCollection, with automatic address normalization and topology-preserving simplification for accurate map display.

Instructions

複数の住所をまとめて取得し、1つのGeoJSON FeatureCollectionとして返す。get_address_location を住所ごとに何度も呼ぶ代わりに使う(例: 「23区すべて」のような複数エンティティをまとめて地図表示したい場合)。最大50件まで。各要素の解決ルール(郡名・政令市名の省略補完、数字表記・異体字の正規化、代表点がない場合のポリゴン重心補完)は get_address_location と共通。simplifyは全Featureをまとめてトポロジー(共有境界線)を保持したまま簡略化するため、get_address_locationと違って隣接する地域間に隙間が生じない。一部の住所が解決できなくても全体を失敗にはせず、featuresから除外した上でunresolvedとして注記する(全件失敗のときのみisError)。戻り値のFeatureCollectionは標準的なGeoJSON(RFC 7946)なので、Leaflet等の地図ライブラリにそのまま渡せる(座標変換・SVGでの手動描画は不要)。dropSmallIslands(都道府県のみ指定可)を使うと、47都道府県すべてを結合した日本地図のような全国スケールの用途でも扱えるサイズまで縮小できる。degenerateIslands(dropSmallIslands:trueかつsimplify指定時のみ)でさらに軽量化できるが、いずれの設定でも地図に表示されない離島があることは必ずnoteで案内される。地図を作りたい/表示したい/見せてほしい、のようにClaude自身が取得したポリゴンを使ってその場で地図やアプリを組み立てる依頼では、必ずこのTool(get_address_locations)を使うこと — save_address_locations_to_fileはファイルに書き出すだけで中身がレスポンスに含まれないため、地図を描画できない。結果をそのまま会話に返す必要がなく、ファイルとして保存したいだけの場合(例: 「GeoJSONとしてエクスポートして」)にのみ save_address_locations_to_file を使うこと。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
simplifyNoポリゴンの座標点数を間引くレベル(既定 'none')。全件をまとめてトポロジー(共有境界線)を保持したまま簡略化するため、get_address_locationの`simplify`(各ポリゴンを独立に間引く)と異なり、隣接する地域同士の境界がズレて隙間が生じることはない。必要性は住所のレベルによって大きく異なる: 丁目・丁目なし町レベルを複数まとめて取得する場合、1件あたり元々数十〜100点程度しかなく、simplifyの効果はほぼないため通常は指定不要。市区町村・政令市区レベルを複数まとめて取得する場合(例: 23区すべて)は1件あたり数百〜数千点になり得るため、まず 'low'(軽微)または 'medium'(標準)を検討する価値がある。'high'(積極的)は小さい町ほど形状の崩れが目立ち見た目が実用に耐えないことが多いため、'low'/'medium' でも点数が収まらない場合の最終手段として使うこと(理由なく既定選択にしない)。
addressesYes住所文字列またはURIの配列(最大50件)。各要素は get_address_location と同じ表記ゆれ(郡名・政令市名の省略、全角数字・漢数字・ハイフン区切り、「ケ/ヶ/ヵ」等の異体字)を自動補完する。例: 東京都23区すべてのポリゴンをまとめて取得したい場合、まず list_child_addresses(parent:'東京都') で23件のuriを取得し、そのままこの配列に渡す。47都道府県すべてが欲しい場合は、名前を手で列挙せずlist_prefectures の結果を使うこと(手で列挙すると書き漏らしが起きることがある)。**ただし47都道府県すべてを結合した日本地図が欲しい場合、47件を1回で渡さないこと** — Claude Desktop等の多くのMCPクライアントには、Tool呼び出し1回の結果が約1MBを超えると失敗する制限があり、47都道府県一括はこのサーバーの最も軽量な組み合わせ(dropSmallIslands:true, degenerateIslands:'omit', simplify:'high')でも1.14MBとなり必ず超過する(このケースはdropSmallIslands/degenerateIslands/simplifyをどう指定しても、サーバー側の安全弁でも解決できないほど大きい。件数を減らす以外に方法はない)。代わりに次の5グループに分け、このToolを5回呼ぶこと(同じ組み合わせなら各グループ1MB未満に収まる。最大の本州グループでも約930KB): 北海道=[北海道]。本州=[青森県,岩手県,宮城県,秋田県,山形県,福島県,茨城県,栃木県,群馬県,埼玉県,千葉県,東京都,神奈川県,新潟県,富山県,石川県,福井県,山梨県,長野県,岐阜県,静岡県,愛知県,三重県,滋賀県,京都府,大阪府,兵庫県,奈良県,和歌山県,鳥取県,島根県,岡山県,広島県,山口県](34件)。四国=[徳島県,香川県,愛媛県,高知県]。九州=[福岡県,佐賀県,長崎県,熊本県,大分県,宮崎県,鹿児島県]。沖縄=[沖縄県]。これらの陸地は互いに海で隔てられているため、5分割しても通常は境界に隙間は生じない(実測: 実際に隣接する87組中86組はグループ内に収まる)。**唯一の既知の例外は岡山県(本州)⇔香川県(四国)**(瀬戸内海上の小島の行政界を両県が共有しているため)で、この1境界だけはズレうることを許容する。正確な形状(離島を含む完全なポリゴン)が必要で1MB制限のあるクライアントを使わない場合は、5分割せず47件を1回で呼んでもよい。**この上限を超えて複数回に分けて呼ぶ場合(上記の5分割を含む)、simplifyのトポロジー共有(隣接ポリゴンの境界線を隙間なく保つ保証)は呼び出しごとに独立してしまい、別の呼び出しに分かれた地域同士の境界には隙間が生じ得る**(1回の呼び出し内でしか境界共有を保証できないため)。**結果の一部(例: 1件だけ書き漏らした)を後から個別に取得して継ぎ足さないこと** — 同じ理由で、その1件だけ隣接地域との境界がズレる。不足に気づいたら、その不足分が属するグループ(または全件)を揃え直して、そのグループ分の呼び出しを最初からやり直すこと。**ファイルとして保存したいだけで、Claude自身がgeometryの中身を読んで地図やアプリをその場で組み立てる必要がない場合**(例: 「GeoJSONファイルとしてエクスポートして」)は、代わりに save_address_locations_to_file を使うと47都道府県すべてを分割せず1回でローカルファイルへ書き出せる。**ただし「地図を作りたい/表示したい/見せてほしい」のように、Claude自身がその場でポリゴンを使って地図(HTMLやアプリ)を組み立てる必要がある依頼では、save_address_locations_to_fileを使ってはならない** — 書き出したファイルの中身はMCPレスポンスに含まれずClaudeからは見えないため、地図を描画できなくなる。その場合は必ずこのTool(get_address_locations)を使い、上記の5グループ分割を行うこと。
dropSmallIslandsNo既定false(何も除外しない=正確な形状を保つ)。trueにすると、実面積が約0.01km^2(概ね100m四方)未満の離島(岩礁・洲を含む)をポリゴンから丸ごと除外する。**addressesの全要素が都道府県そのもの(例: '東京都'、'沖縄県'。市区町村以下は不可)である場合のみ指定できる**。47都道府県すべてを結合した日本地図のような全国スケールの用途向け: 都道府県レベルは全国で121,834個もの離島パーツを含み、そのほとんどが既に最小限(4点)の構成のため、simplifyによる点数の間引きだけでは大きな削減にならない(実測: 47都道府県でsimplify:'high'でも52万点超)。小さい離島を除外することで座標点数を大幅に削減できる(実測: 上記しきい値で除外すると4万点台まで減り、失われる面積は日本の国土面積の0.0065%のみ)。正確な形状(離島を含む完全なポリゴン)が必要な場合はfalseのまま使うこと。**安全弁**: dropSmallIslands:trueで応答が1MB制限に近づきそうな場合、degenerateIslands/simplifyの指定によらずサーバー側が自動的に最も軽量な組み合わせ(degenerateIslands:'omit', simplify:'high')へ切り替えて再取得する(その旨は必ずnoteで案内される)。ただしこれは1回の呼び出しに含む件数が多すぎる場合(例: 47都道府県一括)までは救えないため、上記addressesの説明にある5グループ分割は引き続き必要。
degenerateIslandsNo**dropSmallIslands:true かつ simplify が'none'以外である場合のみ指定できる**。dropSmallIslandsで大きい離島だけ残した後でも、simplifyの簡略化によって形状が壊れる(退化する)離島が残ることがある。既定'keepOriginal'は、その離島だけ簡略化前のフル精度に戻す(既存の挙動、正確だが座標点数は増える)。'omit'は、その離島を結果から丸ごと除外することでさらに座標点数を削減する(実測: 47都道府県+simplify:'high'で109,435点→49,554点、約55%減)。'omit'を使う場合、dropSmallIslandsによる除外に加えてこの除外がある旨と除外数は必ずnoteとして報告される(いずれの設定でも、地図に表示されない離島が存在することは必ずnoteで案内される)。
Behavior5/5

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

With no annotations, the description fully discloses behaviors: partial failures are excluded and noted as unresolved, only all-fail triggers isError, simplification preserves topology across features, dropSmallIslands is restricted to prefecture-level inputs, and the server automatically switches to the lightest combination as a safety valve. It also states that the output is RFC 7946 GeoJSON directly usable by map libraries.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with the main purpose and uses bold warnings and paragraphs to structure critical rules. It is lengthy and repeats the 'map vs. file' directive twice, plus the exhaustive 47-prefecture splitting detail could arguably be moved to the parameter description, but the overall structure is clear and each section earns its place.

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?

Despite having no output schema and no annotations, the description covers all essential operational aspects: return format, failure handling, parameter constraints, size limitations, and alternatives. It leaves almost no ambiguity about how the tool behaves in complex scenarios, making it highly complete for a tool of this complexity.

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?

Schema coverage is 100%, so the baseline is 3. The description adds meaningful context beyond the schema: it explains the practical impact of simplify levels (e.g., low/medium for wards, high as last resort), the prefecture-only rule for dropSmallIslands, the condition for degenerateIslands, and the recommended address grouping strategy for large sets. While some of this overlaps with schema property descriptions, the narrative guidance helps parameter selection.

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's function: '複数の住所をまとめて取得し、1つのGeoJSON FeatureCollectionとして返す' (gets multiple addresses at once and returns as one GeoJSON FeatureCollection). It explicitly distinguishes it from the single-address get_address_location and from save_address_locations_to_file, making its purpose and scope immediately clear.

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

Usage Guidelines5/5

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

The description gives explicit when-to-use guidance: use this tool instead of calling get_address_location multiple times, and never use save_address_locations_to_file when the AI needs to build a map in the response. It also provides detailed splitting instructions for 47 prefectures to avoid 1MB client limits, including a concrete 5-group example.

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/uedayou/loa-mcp-server'

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