feat: 新增获取开通城市接口

- get_open_cities: 获取开通城市列表 (/api/config/open-cities)
- 支持可选参数 adcode 按行政区划筛选

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-07 19:33:32 +08:00
co-authored by Claude Opus 4.6
parent b48db8450c
commit 000a899561
2 changed files with 23 additions and 8 deletions
+2
View File
@@ -8,6 +8,7 @@ TLBM 无人车运营 API 的 MCP 封装,支持 Hermes、Claude Code 等 AI Age
- **车辆轨迹回放**:指定日期的轨迹和状态信息
- **运单监控**:超时未确认装卸货查询
- **订单查询**:运单汇总查询、订单数据分页查询
- **配置查询**:开通城市列表
## 安装
@@ -99,6 +100,7 @@ mcp_servers:
| `mcp_tlbm_get_orders_by_date` | 指定日期运单 |
| `mcp_tlbm_get_unfinished_orders` | 未完成运单 |
| `mcp_tlbm_query_orders` | 订单数据分页查询 |
| `mcp_tlbm_get_open_cities` | 获取开通城市列表 |
## 车辆状态码说明
+21 -8
View File
@@ -58,7 +58,7 @@ const TOOLS = [
// === 车辆状态 ===
{
name: "list_vehicle_status",
description: "查询所有车辆最新状态,按电量由低到高排序",
description: "查询所有车辆最新状态,按电量由低到高排序(当前仅支持满满)",
inputSchema: { type: "object", properties: {} },
endpoint: { method: "GET", path: "/api/vehicle/status/list" },
},
@@ -76,7 +76,7 @@ const TOOLS = [
},
{
name: "list_vehicle_by_status",
description: "根据状态码查询车辆列表",
description: "根据状态码查询车辆列表(当前仅支持满满)",
inputSchema: {
type: "object",
properties: {
@@ -114,7 +114,7 @@ const TOOLS = [
},
{
name: "list_vehicle_unavailability",
description: "统计所有车辆不可用时长,按不可用时长从小到大排序",
description: "统计所有车辆不可用时长,按不可用时长从小到大排序(当前仅支持满满)",
inputSchema: {
type: "object",
properties: {
@@ -125,7 +125,7 @@ const TOOLS = [
},
{
name: "get_vehicle_drive_mile",
description: "统计车辆在任务中和非任务中的行驶距离",
description: "统计车辆在任务中和非任务中的行驶距离(当前仅支持满满)",
inputSchema: {
type: "object",
properties: {
@@ -168,7 +168,7 @@ const TOOLS = [
// === 订单管理 ===
{
name: "get_order_summary",
description: "根据外部订单号查询运单汇总信息",
description: "根据外部订单号查询运单汇总信息(当前仅支持满满)",
inputSchema: {
type: "object",
properties: {
@@ -180,13 +180,13 @@ const TOOLS = [
},
{
name: "get_today_orders",
description: "查询当日运单汇总列表",
description: "查询当日运单汇总列表(当前仅支持满满)",
inputSchema: { type: "object", properties: {} },
endpoint: { method: "GET", path: "/api/order/summary/today" },
},
{
name: "get_orders_by_date",
description: "查询指定日期的运单汇总列表",
description: "查询指定日期的运单汇总列表(当前仅支持满满)",
inputSchema: {
type: "object",
properties: {
@@ -198,7 +198,7 @@ const TOOLS = [
},
{
name: "get_unfinished_orders",
description: "查询所有未完成的运单汇总列表",
description: "查询所有未完成的运单汇总列表(当前仅支持满满)",
inputSchema: { type: "object", properties: {} },
endpoint: { method: "GET", path: "/api/order/summary/unfinished" },
},
@@ -219,6 +219,19 @@ const TOOLS = [
endpoint: { method: "GET", path: "/api/order/rpc/query" },
},
// === 配置查询 ===
{
name: "get_open_cities",
description: "获取开通城市列表",
inputSchema: {
type: "object",
properties: {
adcode: { type: "string", description: "行政区划代码(可选),如 320200 表示无锡" },
},
},
endpoint: { method: "GET", path: "/api/config/open-cities" },
},
];