MCP Tools Reference: mapstools.googleapis.com

ツール: lookup_weather

現在の天気情報、1 時間ごとの予報、毎日の予報など、包括的な天気データを取得します。利用可能な特定のデータ: 気温(現在、体感温度、最高/最低、暑さ指数)、風(風速、突風、風向)、天体現象(日の出/日の入り、月相)、降水(種類、確率、量/QPF)、大気状態(UV 指数、湿度、雲量、雷雨の確率)、ジオコード化された位置情報。Location & Location Rules(重大): 天気データの取得をリクエストする場所は、'location' フィールドを使用して指定します。このフィールドは「oneof」構造です。正確な天気データのルックアップを保証するため、以下の 3 つの場所サブフィールドのうち 1 つのみに値を指定する必要があります。1. 地理座標(lat_lng)* 正確な緯度/経度座標が提供された場合に使用します。* 例: "lat_lng": { "latitude": 34.0522, "longitude": -118.2437 } // ロサンゼルス 2. 場所 ID(place_id) * 曖昧さのない文字列識別子(Google マップの場所 ID)。 * place_id は search_places ツールから取得できます。* 例: "place_id": "ChIJLU7jZClu5kcR4PcOOO6p3I0" // エッフェル塔 3. 住所文字列(address)* ジオコーディングに固有性が必要な自由形式の文字列。* 市区町村と地域: 常に地域/国を含めます(例: (「ロンドン」ではなく「ロンドン、英国」)。* 住所: 完全な住所を入力します(例: "1600 Pennsylvania Ave NW, Washington, DC")。* 郵便番号: 国名と併記する必要があります(例: 「90210, USA」のように、国名も指定します(「90210」だけでは不可)。使用モード: 1. Current Weather(現在の天気): address のみを提供します。datehour は指定しないでください。2. 1 時間ごとの天気予報: addressdatehour(0 ~ 23)を指定します。特定の時間に使用する(例: 「午後 5 時」)や、「次の数時間」や「今日の午後」などの表現を使用します。お客様が分単位で指定した場合は、最も近い時間に切り捨てます。現在から 48 時間を超える時間単位の天気予報はサポートされていません。3. 日別の予報: addressdate を提供します。hour を指定しないでください。一般的な日付のリクエストに使用します(例: 「明日の天気」、「金曜日の天気」、「12 月 25 日の天気」など)。今日の日付がコンテキストに含まれていない場合は、お客様に確認する必要があります。本日を含む 7 日を超える日次予測はサポートされていません。過去の天気はサポートされていません。パラメータの制約: * タイムゾーン: datehour の入力はすべて、ユーザーのタイムゾーンではなく、場所の現地タイムゾーンを基準にする必要があります。* 日付形式: 入力は {year, month, day} 個の整数に分割する必要があります。* 単位: デフォルトは METRIC です。ユーザーが米国の基準を暗示している場合や、明示的にリクエストしている場合は、華氏/マイルの units_systemIMPERIAL に設定します。

次のサンプルは、curl を使用して lookup_weather MCP ツールを呼び出す方法を示しています。

Curl リクエスト
                  
curl --location 'https://mapstools.googleapis.com/mcp' \
--header 'content-type: application/json' \
--header 'accept: application/json, text/event-stream' \
--data '{
  "method": "tools/call",
  "params": {
    "name": "lookup_weather",
    "arguments": {
      // provide these details according to the tool's MCP specification
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'
                

入力スキーマ

LookupWeather メソッドのリクエスト - リクエストされた場所の天気予報を表します。

LookupWeatherRequest

JSON 表現
{
  "DEPRECATEDAddress": string,
  "unitsSystem": enum (UnitsSystem),
  "location": {
    object (Location)
  },

  // Union field _date can be only one of the following:
  "date": {
    object (google.type.Date)
  }
  // End of list of possible types for union field _date.

  // Union field _hour can be only one of the following:
  "hour": integer
  // End of list of possible types for union field _hour.
}
フィールド
DEPRECATEDAddress
(deprecated)

string

非推奨: 代わりに location を使用してください。

unitsSystem

enum (UnitsSystem)

省略可。返される天気予報の単位系。指定しない場合、返される天気予報はメートル法になります(デフォルト = METRIC)。

location

object (Location)

必須。天気予報を取得する場所。

共用体フィールド _date

_date は次のいずれかになります。

date

object (google.type.Date)

省略可。必要な天気情報の取得日。注: この日付は、場所フィールドで指定された場所の現地タイムゾーンを基準としています。日付は 7 日以内の日付にする必要があります。

共用体フィールド _hour

_hour は次のいずれかになります。

hour

integer

省略可。リクエストされた天気情報の時間(24 時間形式、0 ~ 23)。この値は、location フィールドで指定された場所の現地タイムゾーンを基準としています。時間ごとの天気予報は、現在時刻から 48 時間先までのみサポートされています。

日付

JSON 表現
{
  "year": integer,
  "month": integer,
  "day": integer
}
フィールド
year

integer

その日付の年。1~9999、または年のない日付を指定する場合は 0 にする必要があります。

month

integer

1 年の中の月。1~12、または月と日のない年を指定する場合は 0 にする必要があります。

day

integer

1 月の中の日付。1~31 で、その年と月で有効な値にする必要があります。または、日が重要でない場合は年のみか年と月を指定するには 0 にする必要があります。

場所

JSON 表現
{

  // Union field location_type can be only one of the following:
  "latLng": {
    object (google.type.LatLng)
  },
  "placeId": string,
  "address": string
  // End of list of possible types for union field location_type.
}
フィールド
共用体フィールド location_type。位置情報を表すさまざまな方法。location_type は次のいずれかになります。
latLng

object (google.type.LatLng)

地理座標を使用して指定されたポイント。

placeId

string

ビジネスに関連付けられているプレイス ID。

address

string

人が読める形式の住所または Plus Code。詳しくは https://plus.codes をご覧ください。

LatLng

JSON 表現
{
  "latitude": number,
  "longitude": number
}
フィールド
latitude

number

緯度(度単位)。範囲 [-90.0, +90.0] 内になければなりません。

longitude

number

経度(度単位)。範囲 [-180.0, +180.0] 内になければなりません。

出力スキーマ

LookupWeather RPC のレスポンス - リクエストされた場所の気象条件を表します。

このレスポンスは時間別と日別の両方の情報を表しているため、レスポンスは時間別、日別、共有の 3 つのセクションに分割されます。Only-Hourly フィールドと Only-Daily フィールドは省略可としてマークされます。時間単位の情報と日単位の情報で共有されるフィールドのうち、常に存在するものは省略可能としてマークされませんが、常に利用できるわけではないものは省略可能としてマークされます。

LookupWeatherResponse

JSON 表現
{
  "weatherCondition": {
    object (WeatherCondition)
  },
  "precipitation": {
    object (Precipitation)
  },
  "wind": {
    object (Wind)
  },
  "DEPRECATEDGeocodedAddress": string,
  "returnedLocation": {
    object (Location)
  },

  // Union field _temperature can be only one of the following:
  "temperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _temperature.

  // Union field _feels_like_temperature can be only one of the following:
  "feelsLikeTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _feels_like_temperature.

  // Union field _heat_index can be only one of the following:
  "heatIndex": {
    object (Temperature)
  }
  // End of list of possible types for union field _heat_index.

  // Union field _air_pressure can be only one of the following:
  "airPressure": {
    object (AirPressure)
  }
  // End of list of possible types for union field _air_pressure.

  // Union field _max_temperature can be only one of the following:
  "maxTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _max_temperature.

  // Union field _min_temperature can be only one of the following:
  "minTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _min_temperature.

  // Union field _feels_like_max_temperature can be only one of the following:
  "feelsLikeMaxTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _feels_like_max_temperature.

  // Union field _feels_like_min_temperature can be only one of the following:
  "feelsLikeMinTemperature": {
    object (Temperature)
  }
  // End of list of possible types for union field _feels_like_min_temperature.

  // Union field _max_heat_index can be only one of the following:
  "maxHeatIndex": {
    object (Temperature)
  }
  // End of list of possible types for union field _max_heat_index.

  // Union field _sun_events can be only one of the following:
  "sunEvents": {
    object (SunEvents)
  }
  // End of list of possible types for union field _sun_events.

  // Union field _moon_events can be only one of the following:
  "moonEvents": {
    object (MoonEvents)
  }
  // End of list of possible types for union field _moon_events.

  // Union field _relative_humidity can be only one of the following:
  "relativeHumidity": integer
  // End of list of possible types for union field _relative_humidity.

  // Union field _uv_index can be only one of the following:
  "uvIndex": integer
  // End of list of possible types for union field _uv_index.

  // Union field _thunderstorm_probability can be only one of the following:
  "thunderstormProbability": integer
  // End of list of possible types for union field _thunderstorm_probability.

  // Union field _cloud_cover can be only one of the following:
  "cloudCover": integer
  // End of list of possible types for union field _cloud_cover.
}
フィールド
weatherCondition

object (WeatherCondition)

天候

precipitation

object (Precipitation)

降水確率と降水量の累積値

wind

object (Wind)

風の状況

DEPRECATEDGeocodedAddress
(deprecated)

string

非推奨: 代わりに returned_location を使用してください。

returnedLocation

object (Location)

必須。天気情報が返される場所。この位置情報はリクエストの位置情報と同じですが、リクエストされた位置情報が粗い位置情報(「Mountain View, CA」など)を検索するフリーテキストの住所である場合は、異なる可能性があります。

共用体フィールド _temperature

_temperature は次のいずれかになります。

temperature

object (Temperature)

1 時間ごとの気温

共用体フィールド _feels_like_temperature

_feels_like_temperature は次のいずれかになります。

feelsLikeTemperature

object (Temperature)

1 時間ごとの体感温度。

共用体フィールド _heat_index

_heat_index は次のいずれかになります。

heatIndex

object (Temperature)

1 時間ごとの暑さ指数。

共用体フィールド _air_pressure

_air_pressure は次のいずれかになります。

airPressure

object (AirPressure)

時間ごとの気圧の状況。

共用体フィールド _max_temperature

_max_temperature は次のいずれかになります。

maxTemperature

object (Temperature)

1 日の最高気温。

共用体フィールド _min_temperature

_min_temperature は次のいずれかになります。

minTemperature

object (Temperature)

1 日の最低気温。

共用体フィールド _feels_like_max_temperature

_feels_like_max_temperature は次のいずれかになります。

feelsLikeMaxTemperature

object (Temperature)

1 日の最高体感温度。

共用体フィールド _feels_like_min_temperature

_feels_like_min_temperature は次のいずれかになります。

feelsLikeMinTemperature

object (Temperature)

1 日の最低体感温度。

共用体フィールド _max_heat_index

_max_heat_index は次のいずれかになります。

maxHeatIndex

object (Temperature)

1 日の最高暑さ指数。

共用体フィールド _sun_events

_sun_events は次のいずれかになります。

sunEvents

object (SunEvents)

太陽に関連するイベント(日の出、日の入りなど)。

共用体フィールド _moon_events

_moon_events は次のいずれかになります。

moonEvents

object (MoonEvents)

月に関連するイベント(月の出、月の入りなど)。

共用体フィールド _relative_humidity

_relative_humidity は次のいずれかになります。

relativeHumidity

integer

相対湿度の割合(0 ~ 100 の値)。常に利用できるとは限らないため、省略可として定義します。

共用体フィールド _uv_index

_uv_index は次のいずれかになります。

uvIndex

integer

最大紫外線(UV)指数。常に利用できるとは限らないため、省略可として定義

共用体フィールド _thunderstorm_probability

_thunderstorm_probability は次のいずれかになります。

thunderstormProbability

integer

雷雨の確率(値は 0 ~ 100)。常に利用できるわけではないため、省略可として定義

共用体フィールド _cloud_cover

_cloud_cover は次のいずれかになります。

cloudCover

integer

空が雲で覆われている割合(0 ~ 100 の値)。常に利用できるわけではないため、省略可として定義します。

温度

JSON 表現
{
  "unit": enum (TemperatureUnit),

  // Union field _degrees can be only one of the following:
  "degrees": number
  // End of list of possible types for union field _degrees.
}
フィールド
unit

enum (TemperatureUnit)

温度値の測定に使用される単位のコード。

共用体フィールド _degrees

_degrees は次のいずれかになります。

degrees

number

指定された単位の温度値(度)。

AirPressure

JSON 表現
{

  // Union field _mean_sea_level_millibars can be only one of the following:
  "meanSeaLevelMillibars": number
  // End of list of possible types for union field _mean_sea_level_millibars.
}
フィールド

共用体フィールド _mean_sea_level_millibars

_mean_sea_level_millibars は次のいずれかになります。

meanSeaLevelMillibars

number

海面気圧の平均値(ミリバール)。

SunEvents

JSON 表現
{
  "sunriseTime": string,
  "sunsetTime": string
}
フィールド
sunriseTime

string (Timestamp format)

日の出の時刻。

注: 北極圏など、特殊なケースでは、日の出の時刻が表示されないことがあります。このような場合、このフィールドは設定されません。

RFC 3339 を使用します。生成された出力は常に Z 正規化され、小数点以下は 0、3、6、または 9 桁になります。「Z」以外のオフセットも使用できます。例: "2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

sunsetTime

string (Timestamp format)

日の入りの時刻。

注: 北極圏など、特殊なケースでは、1 日に日没がない場合があります。このような場合、このフィールドは設定されません。

RFC 3339 を使用します。生成された出力は常に Z 正規化され、小数点以下は 0、3、6、または 9 桁になります。「Z」以外のオフセットも使用できます。例: "2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

タイムスタンプ

JSON 表現
{
  "seconds": string,
  "nanos": integer
}
フィールド
seconds

string (int64 format)

UNIX エポック 1970-01-01T00:00:00Z からの UTC 時刻の秒数を表します。-62135596800 ~ 253402300799 の範囲(両端を含む)にする必要があります(これは 0001-01-01T00:00:00Z ~ 9999-12-31T23:59:59Z に対応します)。

nanos

integer

非負の小数以下の秒数(ナノ秒単位)。このフィールドは期間のナノ秒部分であり、秒の代替ではありません。小数以下を含む負の秒の値は、時間を前方にカウントする負ではない nanos 値を持つ必要があります。0 ~ 999,999,999 の範囲(境界を含む)になります。

MoonEvents

JSON 表現
{
  "moonriseTimes": [
    string
  ],
  "moonsetTimes": [
    string
  ],
  "moonPhase": enum (MoonPhase)
}
フィールド
moonriseTimes[]

string (Timestamp format)

月の上の縁が地平線上に現れる時刻(https://en.wikipedia.org/wiki/Moonrise_and_moonset) を参照)。

注: ほとんどの場合、1 日に 1 回だけ月が昇ります。それ以外の場合、リストが空になることがあります(たとえば、翌日の深夜 0 時以降に月が昇る場合)。ただし、特殊なケース(極地など)では、リストに複数の値が含まれることがあります。この場合、値は昇順で並べ替えられます。

RFC 3339 を使用します。生成された出力は常に Z 正規化され、小数点以下は 0、3、6、または 9 桁になります。「Z」以外のオフセットも使用できます。例: "2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

moonsetTimes[]

string (Timestamp format)

月の上の縁が地平線の下に沈む時刻(https://en.wikipedia.org/wiki/Moonrise_and_moonset) を参照)。

注: ほとんどの場合、1 日に 1 回月没時刻が設定されます。それ以外の場合、リストが空になることがあります(たとえば、翌日の深夜 0 時を過ぎてから月が沈む場合)。ただし、特殊なケース(極地など)では、リストに複数の値が含まれることがあります。この場合、値は昇順で並べ替えられます。

RFC 3339 を使用します。生成された出力は常に Z 正規化され、小数点以下は 0、3、6、または 9 桁になります。「Z」以外のオフセットも使用できます。例: "2014-10-02T15:01:23Z""2014-10-02T15:01:23.045123456Z""2014-10-02T15:01:23+05:30"

moonPhase

enum (MoonPhase)

月相。

WeatherCondition

JSON 表現
{
  "iconBaseUri": string,
  "description": {
    object (google.type.LocalizedText)
  },
  "type": enum (Type)
}
フィールド
iconBaseUri

string

ファイル形式の拡張子を含まないアイコンのベース URI。アイコンを表示するには、必要に応じてテーマとファイル形式の拡張子(.png または .svg)をこの URI に追加します。デフォルトでは、アイコンはライトテーマですが、ダークモード用に _dark を追加できます。たとえば、「https://maps.gstatic.com/weather/v1/dust.svg」や「https://maps.gstatic.com/weather/v1/dust_dark.svg」などです。ここで、icon_base_uri は「https://maps.gstatic.com/weather/v1/dust」です。

description

object (google.type.LocalizedText)

この天気予報のテキストによる説明(ローカライズ済み)。

type

enum (Type)

天候のタイプ。

LocalizedText

JSON 表現
{
  "text": string,
  "languageCode": string
}
フィールド
text

string

以下の google.type.LocalizedText.language_code に対応する言語のローカライズされた文字列。

languageCode

string

テキストの BCP-47 言語コード(「en-US」や「sr-Latn」など)。

詳しくは、http://www.unicode.org/reports/tr35/#Unicode_locale_identifier をご覧ください。

降水量

JSON 表現
{
  "probability": {
    object (PrecipitationProbability)
  },
  "snowQpf": {
    object (QuantitativePrecipitationForecast)
  },
  "qpf": {
    object (QuantitativePrecipitationForecast)
  }
}
フィールド
probability

object (PrecipitationProbability)

降水確率(値は 0 ~ 100)。

snowQpf

object (QuantitativePrecipitationForecast)

一定期間に積もった雪の量(液体の水に換算した量)。注: QPF は Quantitative Precipitation Forecast(定量的降水量予報)の略称です(詳しくは、QuantitativePrecipitationForecast の定義をご覧ください)。

qpf

object (QuantitativePrecipitationForecast)

一定期間に蓄積された降水量を、液体の水に換算して測定した値。注: QPF は Quantitative Precipitation Forecast(定量的降水量予報)の略称です(詳しくは、QuantitativePrecipitationForecast の定義をご覧ください)。

PrecipitationProbability

JSON 表現
{
  "type": enum (PrecipitationType),

  // Union field _percent can be only one of the following:
  "percent": integer
  // End of list of possible types for union field _percent.
}
フィールド
type

enum (PrecipitationType)

降水の種類を示すコード。

共用体フィールド _percent

_percent は次のいずれかになります。

percent

integer

降水確率を示す 0 ~ 100 のパーセンテージ。

QuantitativePrecipitationForecast

JSON 表現
{
  "unit": enum (Unit),

  // Union field _quantity can be only one of the following:
  "quantity": number
  // End of list of possible types for union field _quantity.
}
フィールド
unit

enum (Unit)

降水量の合計を測定するために使用される単位のコード。

共用体フィールド _quantity

_quantity は次のいずれかになります。

quantity

number

一定期間に蓄積された降水量を、液体の水に換算して測定した値。

Wind

JSON 表現
{
  "direction": {
    object (WindDirection)
  },
  "speed": {
    object (WindSpeed)
  },
  "gust": {
    object (WindSpeed)
  }
}
フィールド
direction

object (WindDirection)

風の向き、風が吹いてくる角度。

speed

object (WindSpeed)

風速。

gust

object (WindSpeed)

突風(風速の急激な増加)。

WindDirection

JSON 表現
{
  "cardinal": enum (CardinalDirection),

  // Union field _degrees can be only one of the following:
  "degrees": integer
  // End of list of possible types for union field _degrees.
}
フィールド
cardinal

enum (CardinalDirection)

風が吹いている方角を表すコード。

共用体フィールド _degrees

_degrees は次のいずれかになります。

degrees

integer

風の向き(0 ~ 360 の値)。

WindSpeed

JSON 表現
{
  "unit": enum (SpeedUnit),

  // Union field _value can be only one of the following:
  "value": number
  // End of list of possible types for union field _value.
}
フィールド
unit

enum (SpeedUnit)

風速の測定に使用される単位を表すコード。

共用体フィールド _value

_value は次のいずれかになります。

value

number

風速の値。

場所

JSON 表現
{

  // Union field location_type can be only one of the following:
  "latLng": {
    object (google.type.LatLng)
  },
  "placeId": string,
  "address": string
  // End of list of possible types for union field location_type.
}
フィールド
共用体フィールド location_type。位置情報を表すさまざまな方法。location_type は次のいずれかになります。
latLng

object (google.type.LatLng)

地理座標を使用して指定されたポイント。

placeId

string

ビジネスに関連付けられているプレイス ID。

address

string

人が読める形式の住所または Plus Code。詳しくは https://plus.codes をご覧ください。

LatLng

JSON 表現
{
  "latitude": number,
  "longitude": number
}
フィールド
latitude

number

緯度(度単位)。範囲 [-90.0, +90.0] 内になければなりません。

longitude

number

経度(度単位)。範囲 [-180.0, +180.0] 内になければなりません。

ツールのアノテーション

破壊的ヒント: ❌ | べき等ヒント: ❌ | 読み取り専用ヒント: ✅ | オープン ワールド ヒント: ❌