SuperAPI AI 工具集

grounding-lite

通用与其它

查看项目

更新于 10-16 07:11

技能介绍

Grounding Lite 是 Google Maps 推出的 MCP(Model Context Protocol)服务,旨在为 AI 应用提供基于位置的数据支持。该服务目前处于实验阶段(pre-GA),在预览期间免费使用。

用途

Grounding Lite 让 AI 模型能够获取真实的地理位置信息,包括地点搜索、天气查询和路线计算,从而在对话或应用中提供与位置相关的回答。

主要能力

该服务提供三个工具:

  • search_places:查找地点、商家和地址,返回带有 Google Maps 链接的 AI 摘要。参数包括 textQuery(必填)、locationBias、languageCode、regionCode。
  • lookup_weather:获取当前天气状况和预报,支持逐小时(48 小时)和逐日(7 天)预报。参数包括 location(必填,支持 address/latLng/placeId)、unitsSystem、date、hour。
  • compute_routes:计算出行距离和时长,不提供逐向导航。参数包括 origin、destination(必填)、travelMode(DRIVE/WALK)。

使用方式

  1. 启用 API:gcloud beta services enable mapstools.googleapis.com
  2. 从 Cloud Console 获取 API 密钥
  3. 设置环境变量:export GOOGLE_MAPS_API_KEY="YOUR_KEY"
  4. 配置 mcporter:
mcporter config add grounding-lite \
  --url https://mapstools.googleapis.com/mcp \
  --header "X-Goog-Api-Key=$GOOGLE_MAPS_API_KEY" \
  --system

调用示例:

# 搜索地点
mcporter call grounding-lite.search_places textQuery="pizza near Times Square NYC"

# 天气
mcporter call grounding-lite.lookup_weather location='{"address":"San Francisco, CA"}' unitsSystem=IMPERIAL

# 路线
mcporter call grounding-lite.compute_routes origin='{"address":"SF"}' destination='{"address":"LA"}' travelMode=DRIVE

# 列出工具
mcporter list grounding-lite --schema

适用场景

适用于需要在 AI 应用中集成地理位置信息的场景,例如本地搜索、天气查询、出行规划等。

限制

  • 速率限制:search_places 为 100 QPM(每日 1k),lookup_weather 为 300 QPM,compute_routes 为 300 QPM。
  • 面向用户的输出中必须包含 Google Maps 链接(归属要求)。
  • 仅可与不会使用输入数据训练的模型配合使用。
  • 该服务为实验性(pre-GA),预览期间免费。