MCP Tools Reference: mapstools.googleapis.com

工具:lookup_weather

擷取全面的天氣資料,包括目前天氣狀況、每小時和每日預報。

可用的特定資料:溫度 (目前、體感、最高/最低、熱指數)、風 (風速、陣風、風向)、天文事件 (日出/日落、月相)、降水 (類型、機率、數量/QPF)、大氣條件 (紫外線指數、濕度、雲量、雷暴機率) 和地理編碼位置地址。

位置和位置規則 (重要):

您可以使用 location 欄位指定要查詢天氣資料的地點。這個欄位是「oneof」結構,也就是說,您「必須」只為下列三個位置子欄位中的「一個」提供值,才能確保天氣資料查詢準確。

  1. 地理座標 (lat_lng)

    • 當您取得確切的經緯度座標時,請使用這個方法。
    • 範例:{"location": {"lat_lng": {"latitude": 34.0522, "longitude": -118.2437}}} // 洛杉磯
  2. 地點 ID (place_id)

    • 明確的字串 ID (Google 地圖地點 ID)。
    • place_id 可透過 search_places 工具擷取。
    • 示例:{"location": {"place_id": "ChIJLU7jZClu5kcR4PcOOO6p3I0"}} // 艾菲爾鐵塔
  3. 地址字串 (address)

    • 自由形式的字串,需要明確指定地理編碼。
    • 城市和地區:一律包含地區/國家/地區 (例如「英國倫敦」,而非「倫敦」)。
    • 街道地址:提供完整地址 (例如「1600 Pennsylvania Ave NW, Washington, DC」)。
    • 郵遞區號:必須附上國家/地區名稱 (例如「90210, USA」,而非「90210」)。
    • 範例:{"location": {"address": "1600 Pennsylvania Ave NW, Washington, DC"}}

使用模式:

  • 目前天氣:僅提供 location。請勿指定 date 和 hour。

  • 每小時預測:提供 location、date 和 hour (0-23)。用於特定時間 (例如「下午 5 點」) 或「接下來幾小時」或「今天稍晚」等字詞。如果使用者指定分鐘,則會四捨五入至最接近的小時。不支援 120 小時後的每小時預報。系統最多可提供過去 24 小時的每小時天氣記錄。

  • 每日預測:提供 location 和 date。請勿指定 hour。用於一般日期要求 (例如「明天的天氣」、「週五的天氣」、「12 月 25 日的天氣」)。如果內容中沒有今天的日期,請向使用者確認。不支援 10 天 (含今天) 之後的每日預測。不支援過往天氣。

參數限制:

  • 時區:所有 date 和 hour 輸入內容都必須以地點的當地時區為準,而非使用者的時區。
  • 日期格式:輸入內容必須分成 {year, month, day} 個整數。
  • 單位:預設為 METRIC。如果使用者暗示或明確要求採用美國標準,請將 units_system 設為 IMPERIAL,以華氏/英里為單位。
  • 建立基準的輸出內容必須註明來源,並盡可能使用 attribution 欄位中的資訊。

下列程式碼範例說明如何使用 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 MCP tool specification.
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}'

輸入內容的結構定義

LookupWeather 方法的要求,代表所要求位置的天氣狀況。

LookupWeatherRequest

JSON 表示法
{
  "unitsSystem": enum (UnitsSystem),
  "location": {
    object (Location)
  },

  // Union field _date can be only one of the following:
  "date": {
    object (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.
}
欄位
unitsSystem

enum (UnitsSystem)

(選用步驟) 傳回的天氣狀況所使用的單位系統。如未提供,傳回的天氣狀況會採用公制 (預設 = METRIC)。

location

object (Location)

必填。要取得天氣狀況的地點。

聯集欄位 _date。

_date 只能是下列其中一個設定:

date

object (Date)

(選用步驟) 所需天氣資訊的日期。注意:這個日期是相對於「地點」欄位中指定地點的當地時區。日期必須介於過去 24 小時到未來 10 天之間。

聯集欄位 _hour。

_hour 只能是下列其中一個設定:

hour

integer

(選用步驟) 所要求天氣資訊的小時,採用 24 小時制 (0-23)。這個值是相對於「地點」欄位中指定地點的當地時區。不支援 120 小時後的每小時預報。系統最多可提供過去 24 小時的每小時天氣記錄。

日期

JSON 表示法
{
  "year": integer,
  "month": integer,
  "day": integer
}
欄位
year

integer

日期的年份。必須介於 1 至 9999 之間,或輸入 0 指定不含年份的日期。

month

integer

一年中的月份。必須介於 1 到 12 之間,或設為 0 來指定不含月和日的年份。

day

integer

日期。必須介於 1 到 31 之間,且為有效的年月日,或設為 0,指定單獨年份或不重要的年月日。

位置

JSON 表示法
{

  // Union field location_type can be only one of the following:
  "latLng": {
    object (LatLng)
  },
  "placeId": string,
  "address": string
  // End of list of possible types for union field location_type.
}
欄位
聯集欄位 location_type。表示位置的不同方式。location_type 只能是下列其中一項:
latLng

object (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] 的範圍之間。

UnitsSystem

代表用於測量值的單位系統。

列舉
UNITS_SYSTEM_UNSPECIFIED 未指定單位系統。
IMPERIAL 英制單位系統 (例如華氏、英里等)。
METRIC 公制單位系統 (例如攝氏、公里等)。

輸出內容的結構定義

LookupWeather RPC 的回應,代表所要求位置的天氣狀況。

這項回應代表每小時和每日資訊,因此會分為三個部分:每小時、每日和共用。Only-Hourly、Only-Daily 欄位會標示為選填。在每小時和每日資訊共用的欄位中,有些欄位一律會顯示,因此不會標示為選填,其餘欄位則會標示為選填,因為不一定會提供。

LookupWeatherResponse

JSON 表示法
{
  "weatherCondition": {
    object (WeatherCondition)
  },
  "precipitation": {
    object (Precipitation)
  },
  "wind": {
    object (Wind)
  },
  "returnedLocation": {
    object (Location)
  },
  "attribution": {
    object (Attribution)
  },

  // 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)

風力

returnedLocation

object (Location)

必填。傳回天氣資訊的位置。這個位置與要求中的位置相同,但如果要求的位置是查閱大概位置的自由文字地址 (例如「Mountain View, CA」),則可能與要求中的位置不同。

attribution

object (Attribution)

天氣資訊必須顯示的出處。

聯集欄位 _temperature。

_temperature 只能是下列其中一個設定:

temperature

object (Temperature)

每小時溫度

聯集欄位 _feels_like_temperature。

_feels_like_temperature 只能是下列其中一個設定:

feelsLikeTemperature

object (Temperature)

每小時的體感溫度。

聯集欄位 _heat_index。

_heat_index 只能是下列其中一個設定:

heatIndex

object (Temperature)

每小時酷熱指數溫度。

聯集欄位 _air_pressure。

_air_pressure 只能是下列其中一個設定:

airPressure

object (AirPressure)

每小時氣壓狀況。

聯集欄位 _max_temperature。

_max_temperature 只能是下列其中一個設定:

maxTemperature

object (Temperature)

全天最高溫度。

聯集欄位 _min_temperature。

_min_temperature 只能是下列其中一個設定:

minTemperature

object (Temperature)

全天最低溫。

聯集欄位 _feels_like_max_temperature。

_feels_like_max_temperature 只能是下列其中一個設定:

feelsLikeMaxTemperature

object (Temperature)

全天最高體感溫度。

聯集欄位 _feels_like_min_temperature。

_feels_like_min_temperature 只能是下列其中一個設定:

feelsLikeMinTemperature

object (Temperature)

全天最低體感溫度。

聯集欄位 _max_heat_index。

_max_heat_index 只能是下列其中一個設定:

maxHeatIndex

object (Temperature)

全天最高熱指數溫度。

聯集欄位 _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)

日落時間。

注意:在某些特殊情況下 (例如北極圈以北),可能會有某一天沒有日落時間。在這些情況下,這個欄位不會設定。

使用 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 起算的世界標準時間秒數。必須介於 -62135596800 和 253402300799 (含) 之間 (對應 0001-01-01T00:00:00Z 至 9999-12-31T23:59:59Z)。

nanos

integer

以奈秒解析度表示的非負分數秒。這個欄位是時間長度的奈秒部分,而非秒數的替代值。含有分數的負秒值仍須有非負奈秒值,以向前計算時間。必須介於 0 至 999,999,999 之間 (含 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)。

注意:在大多數情況下,每天會有一個月出時間。在其他情況下,清單可能空白 (例如月亮在隔天午夜後升起)。不過,在特殊情況下 (例如極地地區),清單可能會包含多個值。在這種情況下,值會以遞增順序排序。

使用 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)。

注意:在多數情況下,每天會有一個月落時間。在其他情況下,清單可能為空白 (例如月亮在隔天午夜後落下)。不過,在特殊情況下 (例如極地地區),清單可能會包含多個值。在這種情況下,值會以遞增順序排序。

使用 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 (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 (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 是定量降水預報的縮寫 (詳情請參閱 QuantitativePrecipitationForecast 定義)。

qpf

object (QuantitativePrecipitationForecast)

一段時間內累積的降雨量,以液態水當量測量。注意:QPF 是定量降水預報的縮寫 (詳情請參閱 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

一段時間內累積的降水量,以液態水當量測量。

風速

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 (LatLng)
  },
  "placeId": string,
  "address": string
  // End of list of possible types for union field location_type.
}
欄位
聯集欄位 location_type。表示位置的不同方式。location_type 只能是下列其中一項:
latLng

object (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] 的範圍之間。

歸因

JSON 表示法
{
  "title": string,
  "url": string
}
欄位
title

string

出處資訊的顯示標題。

url

string

出處連結的網址。

TemperatureUnit

代表用於測量溫度的單位。

列舉
TEMPERATURE_UNIT_UNSPECIFIED 未指定溫度單位。
CELSIUS 溫度以攝氏為單位。
FAHRENHEIT 溫度以華氏為單位。

MoonPhase

標示月相。

列舉
MOON_PHASE_UNSPECIFIED 未指定月相。
NEW_MOON 月球不會被太陽照亮。
WAXING_CRESCENT 月球右側 (北半球 🌒) 或左側 (南半球 🌘) 的亮度為 0% 到 50%。
FIRST_QUARTER 月球右側 (北半球) 🌓 或左側 (南半球) 🌗 的受光面積為 50.1%。
WAXING_GIBBOUS 月亮右側 (北半球) 🌔或左側 (南半球) 🌖有 50% 到 100% 的部分受到照亮。
FULL_MOON 月球完全照亮。
WANING_GIBBOUS 北半球月亮左側 50% 至 100% 的部分會發光 🌖,南半球則是右側 50% 至 100% 的部分會發光 🌔。
LAST_QUARTER 月球在北半球的左側 🌗 和南半球的右側 🌓 照亮 50.1%。
WANING_CRESCENT 月球左側 (北半球 🌘) 或右側 (南半球 🌒) 的受光面積為 0% 到 50%。

類型

標示預報元素內容中的天氣狀況類型。

列舉
TYPE_UNSPECIFIED 未指定天氣狀況。
CLEAR 無雲。
MOSTLY_CLEAR 偶爾有雲。
PARTLY_CLOUDY 局部多雲 (有雲)。
MOSTLY_CLOUDY 多雲時陰 (雲多於陽光)。
CLOUDY 多雲 (全雲,無太陽)。
WINDY 強風。
WIND_AND_RAIN 強風伴隨降雨。
LIGHT_RAIN_SHOWERS 間歇性小雨。
CHANCE_OF_SHOWERS 可能會有間歇性降雨。
SCATTERED_SHOWERS 間歇性降雨。
RAIN_SHOWERS 陣雨是指降雨時間比雨短,且開始和停止時間突然,強度變化快速。
HEAVY_RAIN_SHOWERS 強陣雨。
LIGHT_TO_MODERATE_RAIN 雨 (小雨至中雨)。
MODERATE_TO_HEAVY_RAIN 雨 (中雨至大雨)。
RAIN 中雨。
LIGHT_RAIN 小雨。
HEAVY_RAIN 大雨。
RAIN_PERIODICALLY_HEAVY 降雨偶大雨。
LIGHT_SNOW_SHOWERS 短暫降下小雪,強度不一。
CHANCE_OF_SNOW_SHOWERS 可能有陣雪。
SCATTERED_SNOW_SHOWERS 短暫降雪,強度不一。
SNOW_SHOWERS 陣雪。
HEAVY_SNOW_SHOWERS 大陣雪。
LIGHT_TO_MODERATE_SNOW 小雪至中雪。
MODERATE_TO_HEAVY_SNOW 中雪至大雪。
SNOW 中雪。
LIGHT_SNOW 小雪。
HEAVY_SNOW 大雪。
SNOWSTORM 降雪,可能伴隨雷電。
SNOW_PERIODICALLY_HEAVY 降雪,偶有大雪。
HEAVY_SNOW_STORM 大雪,可能伴隨雷電。
BLOWING_SNOW 下雪,風勢強勁。
RAIN_AND_SNOW 雨夾雪。
HAIL 冰雹。
HAIL_SHOWERS 短時間內降下強度不一的冰雹。
THUNDERSTORM 雷雨。
THUNDERSHOWER 陣雨,伴隨雷電。
LIGHT_THUNDERSTORM_RAIN 小雷雨。
SCATTERED_THUNDERSTORMS 雷雨,短暫降雨,強度不一。
HEAVY_THUNDERSTORM 大雷雨。

PrecipitationType

代表特定地點的降水類型。

列舉
PRECIPITATION_TYPE_UNSPECIFIED 未指定降水類型。
NONE 不會降水。
SNOW 降雪。
RAIN 降雨量。
LIGHT_RAIN 小雨。
HEAVY_RAIN 大雨。
RAIN_AND_SNOW 雨雪交加。
SLEET 雨夾雪。
FREEZING_RAIN 凍雨降水。

單位

代表累積降雨量的測量單位。

列舉
UNIT_UNSPECIFIED 未指定降水單位。
MILLIMETERS 降雨量以毫米為單位。
INCHES 降水量以英寸為單位。

CardinalDirection

代表基本方向 (包括序數方向)。

列舉
CARDINAL_DIRECTION_UNSPECIFIED 未指定基本方向。
NORTH 北方位。
NORTH_NORTHEAST 北北東次要間方位。
NORTHEAST 東北方。
EAST_NORTHEAST 東北東次要方位。
EAST 東方。
EAST_SOUTHEAST 東南東,次要間方位。
SOUTHEAST 東南方向。
SOUTH_SOUTHEAST 南南東次要間方位。
SOUTH 南方。
SOUTH_SOUTHWEST 南南西,次要間方位。
SOUTHWEST 西南方。
WEST_SOUTHWEST 西南西,次要方位。
WEST 西方。
WEST_NORTHWEST 西北西次要方位。
NORTHWEST 西北方。
NORTH_NORTHWEST 北北西,次要間方位。

SpeedUnit

代表速度的測量單位。

列舉
SPEED_UNIT_UNSPECIFIED 未指定速度單位。
KILOMETERS_PER_HOUR 速度以公里/小時為單位。
MILES_PER_HOUR 速度以英里/小時為單位。

工具註解

工具註解會傳送至 MCP 用戶端,說明特定工具的基本風險。大多數用戶端會將這些提示視為不受信任,但可用於決定何時向使用者傳送確認提示。

除了標題字串外,下列布林值提示的定義如下:

  • readOnlyHint:如果設為 true,工具不會修改環境。預設值:false。
  • destructiveHint:如果為 true,工具可以執行破壞性動作。如果為 false,則工具只能執行附加動作。預設值:true。
  • idempotentHint:如果設為 true,則使用相同引數重複呼叫工具,不會對環境造成額外影響。預設值:false。
  • openWorldHint:如果設為 true,工具就能與外部實體的「開放世界」互動。如果設為 false,工具只能與內部實體互動。舉例來說,網頁搜尋工具是開放世界,而記憶工具則不是。

Destructive Hint: ❌ | Idempotent Hint: ❌ | Read Only Hint: ✅ | Open World Hint: ❌