Appearance
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_detail | AOI 面信息和边界轮廓查询 |
maps_ip_location | IP 定位 |
maps_distance | 两点球面直线距离测量 |
maps_direction_driving | 驾车路线规划 |
maps_direction_walking | 步行路线规划 |
maps_direction_bicycling | 骑行路线规划 |
maps_direction_transit | 公交换乘路线规划 |
maps_static_map | 静态地图生成 |
maps_geo
将结构化地址或地标名称解析为经纬度坐标,支持景区、建筑物名称等地点解析。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
address | 是 | string | 要解析的结构化地址或地标名称 |
city | 否 | string | 查询城市,用于限定或提升匹配准确度 |
location | 否 | string | 位置偏好坐标,格式为 经度,纬度 |
调用示例:
json
{
"name": "maps_geo",
"arguments": {
"address": "北京南站",
"city": "北京"
}
}返回字段包括:
| 字段 | 说明 |
|---|---|
status | 调用状态 |
location | 坐标字符串 |
lng / lat | 经度、纬度 |
display_name | 匹配地点名称 |
address | 地址 |
city | 城市 |
maps_regeocode
将经纬度坐标转换为地址信息。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
location | 是 | string | 位置坐标,格式为 经度,纬度 |
调用示例:
json
{
"name": "maps_regeocode",
"arguments": {
"location": "116.397128,39.916527"
}
}返回字段包括 address、address_all、display_name、city、city_code、county、county_id、coordinates、formatted_address。
maps_textsearch
根据关键词和城市搜索 POI 地点信息。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
keywords | 是 | string | 搜索关键词 |
city | 是 | string | 查询城市 |
location | 否 | string | 位置坐标,格式为 经度,纬度 |
调用示例:
json
{
"name": "maps_textsearch",
"arguments": {
"keywords": "餐厅",
"city": "北京",
"location": "116.397128,39.916527"
}
}返回 POI 列表,每项包含 display_name、address、address_all、location、city。
maps_place_around
根据中心点坐标和关键词搜索周边 POI。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
location | 是 | string | 中心点坐标,格式为 经度,纬度 |
keywords | 是 | string | 搜索关键词 |
max_distance | 否 | string | 搜索半径,单位为米 |
调用示例:
json
{
"name": "maps_place_around",
"arguments": {
"location": "116.397128,39.916527",
"keywords": "咖啡厅",
"max_distance": "1000"
}
}返回 POI 列表,每项包含 display_name、address、address_all、location、city、distance。
maps_inputtips
根据用户输入的关键词和城市返回地点候选结果。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
keywords | 是 | string | 搜索关键词 |
city | 是 | string | 查询城市 |
location | 否 | string | 位置坐标,格式为 经度,纬度 |
调用示例:
json
{
"name": "maps_inputtips",
"arguments": {
"keywords": "故宫",
"city": "北京"
}
}返回地点候选列表,每项包含 display_name、address、address_all、location、city、distance。
maps_search_detail
通过 POI ID 查询 AOI 面信息,返回地点基础信息、面积和边界轮廓坐标点串。实现中该工具会将入参 id 解密后调用 AOI 详情服务,返回的 coordinates 字段为 AOI 边界点串,格式为 lng,lat;lng,lat。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
id | 是 | string | 加密/混淆 POI ID,用于查询 AOI 面轮廓 |
调用示例:
json
{
"name": "maps_search_detail",
"arguments": {
"id": "POI_ID"
}
}返回结果为数组,每项字段包括 poi_id、name、location、lng、lat、address、city、type、area、coordinates、adcode。其中 coordinates 是 AOI 面边界点串;部分 POI 可能没有面轮廓,字段可能为空。
maps_ip_location
根据 IP 地址返回地理位置信息。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
ip | 是 | string | 要查询的 IP 地址 |
调用示例:
json
{
"name": "maps_ip_location",
"arguments": {
"ip": "8.8.8.8"
}
}返回结果由 IP 定位服务提供,通常包含省、市、区县或行政编码等位置信息。
maps_distance
测量两个经纬度坐标之间的球面直线距离。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
origin | 是 | string | 起点坐标,格式为 经度,纬度 |
destination | 是 | string | 终点坐标,格式为 经度,纬度 |
调用示例:
json
{
"name": "maps_distance",
"arguments": {
"origin": "116.397128,39.916527",
"destination": "116.407396,39.904200"
}
}返回 distance.text 和 distance.value。在 MCP 工具响应中,该工具会优先返回简洁距离文本。
maps_direction_driving
根据起终点坐标规划驾车路线。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
origin | 是 | string | 起点坐标,格式为 经度,纬度 |
destination | 是 | string | 终点坐标,格式为 经度,纬度 |
need_geo | 否 | boolean | 是否返回途经点序列,默认 true |
调用示例:
json
{
"name": "maps_direction_driving",
"arguments": {
"origin": "116.397128,39.916527",
"destination": "116.407396,39.904200",
"need_geo": true
}
}返回字段包括 distance、duration、destination、paths、summary、geo_list。
maps_direction_walking
根据起终点坐标规划步行路线。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
origin | 是 | string | 起点坐标,格式为 经度,纬度 |
destination | 是 | string | 终点坐标,格式为 经度,纬度 |
need_geo | 否 | boolean | 是否返回途经点序列,默认 true |
调用示例:
json
{
"name": "maps_direction_walking",
"arguments": {
"origin": "116.397128,39.916527",
"destination": "116.400531,39.913273"
}
}返回字段包括 distance、duration、destination、paths、summary、geo_list。
maps_direction_bicycling
根据起终点坐标规划骑行路线。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
origin | 是 | string | 起点坐标,格式为 经度,纬度 |
destination | 是 | string | 终点坐标,格式为 经度,纬度 |
need_geo | 否 | boolean | 是否返回途经点序列,默认 true |
调用示例:
json
{
"name": "maps_direction_bicycling",
"arguments": {
"origin": "116.397128,39.916527",
"destination": "116.415314,39.909873"
}
}返回字段包括 distance、duration、destination、paths、summary、geo_list。
maps_direction_transit
根据起终点坐标和城市规划公交、地铁换乘路线。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
origin | 是 | string | 起点坐标,格式为 经度,纬度 |
destination | 是 | string | 终点坐标,格式为 经度,纬度 |
city | 是 | string | 查询城市 |
调用示例:
json
{
"name": "maps_direction_transit",
"arguments": {
"origin": "116.397128,39.916527",
"destination": "116.432094,39.907694",
"city": "北京"
}
}返回字段包括 distance、walking_distance、duration、destination、segments、summary。
maps_static_map
根据行驶轨迹、行驶路径、标记和文本标签生成静态地图图片 URL。
| 参数 | 必选 | 类型 | 说明 |
|---|---|---|---|
markers | 否 | string | 标记坐标,格式为 经度,纬度;经度,纬度 |
labels | 否 | string | 文本标签,格式为 标签内容,经度,纬度|标签内容,经度,纬度 |
paths | 否 | string | 路径,格式为 经度,纬度;经度,纬度|经度,纬度;经度,纬度 |
trajs | 否 | string | 行驶轨迹,格式为 经度,纬度;经度,纬度|经度,纬度;经度,纬度 |
width | 否 | integer | 图片宽度,单位像素,范围 200 到 800 |
height | 否 | integer | 图片高度,单位像素,范围 200 到 800 |
zoom | 否 | integer | 地图缩放级别,范围 4 到 20 |
调用示例:
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。图片链接具有有效期,适合用于结果展示、报告生成和行程页预览。