From 000a8995618cbab4886542ce837f696df16e816e Mon Sep 17 00:00:00 2001 From: JunWang Date: Sun, 7 Jun 2026 19:33:32 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E5=BC=80=E9=80=9A=E5=9F=8E=E5=B8=82=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - get_open_cities: 获取开通城市列表 (/api/config/open-cities) - 支持可选参数 adcode 按行政区划筛选 Co-Authored-By: Claude Opus 4.6 --- README.md | 2 ++ src/index.ts | 29 +++++++++++++++++++++-------- 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 7d4fc50..e279311 100644 --- a/README.md +++ b/README.md @@ -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` | 获取开通城市列表 | ## 车辆状态码说明 diff --git a/src/index.ts b/src/index.ts index a564689..fd29755 100644 --- a/src/index.ts +++ b/src/index.ts @@ -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" }, + }, + ];