Skip to content

MCP 工具列表

本文档列出滴图 MCP Server 当前支持的工具、入参和返回结果说明。所有工具均通过统一入口调用:

text
https://lbs.xiaojukeji.com/api/v2/mcp?key=YOUR_DIDI_KEY

工具总览

工具名能力
maps_geo地址或地标解析为经纬度坐标
maps_regeocode经纬度坐标转换为地址信息
maps_textsearch关键词 POI 搜索
maps_place_around周边 POI 搜索
maps_inputtips输入提示和地点候选
maps_search_detailAOI 面信息和边界轮廓查询
maps_ip_locationIP 定位
maps_distance两点球面直线距离测量
maps_direction_driving驾车路线规划
maps_direction_walking步行路线规划
maps_direction_bicycling骑行路线规划
maps_direction_transit公交换乘路线规划
maps_static_map静态地图生成

maps_geo

将结构化地址或地标名称解析为经纬度坐标,支持景区、建筑物名称等地点解析。

参数必选类型说明
addressstring要解析的结构化地址或地标名称
citystring查询城市,用于限定或提升匹配准确度
locationstring位置偏好坐标,格式为 经度,纬度

调用示例:

json
{
  "name": "maps_geo",
  "arguments": {
    "address": "北京南站",
    "city": "北京"
  }
}

返回字段包括:

字段说明
status调用状态
location坐标字符串
lng / lat经度、纬度
display_name匹配地点名称
address地址
city城市

maps_regeocode

将经纬度坐标转换为地址信息。

参数必选类型说明
locationstring位置坐标,格式为 经度,纬度

调用示例:

json
{
  "name": "maps_regeocode",
  "arguments": {
    "location": "116.397128,39.916527"
  }
}

返回字段包括 addressaddress_alldisplay_namecitycity_codecountycounty_idcoordinatesformatted_address

maps_textsearch

根据关键词和城市搜索 POI 地点信息。

参数必选类型说明
keywordsstring搜索关键词
citystring查询城市
locationstring位置坐标,格式为 经度,纬度

调用示例:

json
{
  "name": "maps_textsearch",
  "arguments": {
    "keywords": "餐厅",
    "city": "北京",
    "location": "116.397128,39.916527"
  }
}

返回 POI 列表,每项包含 display_nameaddressaddress_alllocationcity

maps_place_around

根据中心点坐标和关键词搜索周边 POI。

参数必选类型说明
locationstring中心点坐标,格式为 经度,纬度
keywordsstring搜索关键词
max_distancestring搜索半径,单位为米

调用示例:

json
{
  "name": "maps_place_around",
  "arguments": {
    "location": "116.397128,39.916527",
    "keywords": "咖啡厅",
    "max_distance": "1000"
  }
}

返回 POI 列表,每项包含 display_nameaddressaddress_alllocationcitydistance

maps_inputtips

根据用户输入的关键词和城市返回地点候选结果。

参数必选类型说明
keywordsstring搜索关键词
citystring查询城市
locationstring位置坐标,格式为 经度,纬度

调用示例:

json
{
  "name": "maps_inputtips",
  "arguments": {
    "keywords": "故宫",
    "city": "北京"
  }
}

返回地点候选列表,每项包含 display_nameaddressaddress_alllocationcitydistance

maps_search_detail

通过 POI ID 查询 AOI 面信息,返回地点基础信息、面积和边界轮廓坐标点串。实现中该工具会将入参 id 解密后调用 AOI 详情服务,返回的 coordinates 字段为 AOI 边界点串,格式为 lng,lat;lng,lat

参数必选类型说明
idstring加密/混淆 POI ID,用于查询 AOI 面轮廓

调用示例:

json
{
  "name": "maps_search_detail",
  "arguments": {
    "id": "POI_ID"
  }
}

返回结果为数组,每项字段包括 poi_idnamelocationlnglataddresscitytypeareacoordinatesadcode。其中 coordinates 是 AOI 面边界点串;部分 POI 可能没有面轮廓,字段可能为空。

maps_ip_location

根据 IP 地址返回地理位置信息。

参数必选类型说明
ipstring要查询的 IP 地址

调用示例:

json
{
  "name": "maps_ip_location",
  "arguments": {
    "ip": "8.8.8.8"
  }
}

返回结果由 IP 定位服务提供,通常包含省、市、区县或行政编码等位置信息。

maps_distance

测量两个经纬度坐标之间的球面直线距离。

参数必选类型说明
originstring起点坐标,格式为 经度,纬度
destinationstring终点坐标,格式为 经度,纬度

调用示例:

json
{
  "name": "maps_distance",
  "arguments": {
    "origin": "116.397128,39.916527",
    "destination": "116.407396,39.904200"
  }
}

返回 distance.textdistance.value。在 MCP 工具响应中,该工具会优先返回简洁距离文本。

maps_direction_driving

根据起终点坐标规划驾车路线。

参数必选类型说明
originstring起点坐标,格式为 经度,纬度
destinationstring终点坐标,格式为 经度,纬度
need_geoboolean是否返回途经点序列,默认 true

调用示例:

json
{
  "name": "maps_direction_driving",
  "arguments": {
    "origin": "116.397128,39.916527",
    "destination": "116.407396,39.904200",
    "need_geo": true
  }
}

返回字段包括 distancedurationdestinationpathssummarygeo_list

maps_direction_walking

根据起终点坐标规划步行路线。

参数必选类型说明
originstring起点坐标,格式为 经度,纬度
destinationstring终点坐标,格式为 经度,纬度
need_geoboolean是否返回途经点序列,默认 true

调用示例:

json
{
  "name": "maps_direction_walking",
  "arguments": {
    "origin": "116.397128,39.916527",
    "destination": "116.400531,39.913273"
  }
}

返回字段包括 distancedurationdestinationpathssummarygeo_list

maps_direction_bicycling

根据起终点坐标规划骑行路线。

参数必选类型说明
originstring起点坐标,格式为 经度,纬度
destinationstring终点坐标,格式为 经度,纬度
need_geoboolean是否返回途经点序列,默认 true

调用示例:

json
{
  "name": "maps_direction_bicycling",
  "arguments": {
    "origin": "116.397128,39.916527",
    "destination": "116.415314,39.909873"
  }
}

返回字段包括 distancedurationdestinationpathssummarygeo_list

maps_direction_transit

根据起终点坐标和城市规划公交、地铁换乘路线。

参数必选类型说明
originstring起点坐标,格式为 经度,纬度
destinationstring终点坐标,格式为 经度,纬度
citystring查询城市

调用示例:

json
{
  "name": "maps_direction_transit",
  "arguments": {
    "origin": "116.397128,39.916527",
    "destination": "116.432094,39.907694",
    "city": "北京"
  }
}

返回字段包括 distancewalking_distancedurationdestinationsegmentssummary

maps_static_map

根据行驶轨迹、行驶路径、标记和文本标签生成静态地图图片 URL。

参数必选类型说明
markersstring标记坐标,格式为 经度,纬度;经度,纬度
labelsstring文本标签,格式为 标签内容,经度,纬度|标签内容,经度,纬度
pathsstring路径,格式为 经度,纬度;经度,纬度|经度,纬度;经度,纬度
trajsstring行驶轨迹,格式为 经度,纬度;经度,纬度|经度,纬度;经度,纬度
widthinteger图片宽度,单位像素,范围 200800
heightinteger图片高度,单位像素,范围 200800
zoominteger地图缩放级别,范围 420

调用示例:

json
{
  "name": "maps_static_map",
  "arguments": {
    "markers": "116.397128,39.916527;116.407396,39.904200",
    "paths": "116.397128,39.916527;116.400531,39.913273;116.407396,39.904200",
    "labels": "起点,116.397128,39.916527|终点,116.407396,39.904200",
    "width": 600,
    "height": 400,
    "zoom": 12
  }
}

返回结果为静态地图图片 URL。图片链接具有有效期,适合用于结果展示、报告生成和行程页预览。