diff --git a/README.md b/README.md index 6664453..1108c5f 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ TLBM 无人车运营 API 的 MCP 封装,支持 Hermes、Claude Code 等 AI Age - **车辆状态查询**:实时状态、不可用统计、工作时长指标、行驶距离 - **车辆轨迹回放**:指定日期的轨迹和状态信息 -- **订单查询**:运单汇总查询、SDK订单详情 +- **运单监控**:超时未确认装卸货查询 +- **订单查询**:运单汇总查询、订单数据分页查询 - **用户查询**:角色查询、OpenID查询用户 ## 安装 @@ -118,13 +119,12 @@ mcp_servers: | `mcp_tlbm_list_vehicle_unavailability` | 所有车辆不可用统计 | | `mcp_tlbm_get_vehicle_drive_mile` | 统计行驶距离 | | `mcp_tlbm_get_vehicle_path_playback` | 轨迹回放 | -| `mcp_tlbm_get_vehicle_detail` | 车辆详情(含司机) | +| `mcp_tlbm_get_overdue_shipping` | 查询超时未确认装卸货 | | `mcp_tlbm_get_order_summary` | 查询运单汇总 | | `mcp_tlbm_get_today_orders` | 当日运单列表 | | `mcp_tlbm_get_orders_by_date` | 指定日期运单 | | `mcp_tlbm_get_unfinished_orders` | 未完成运单 | -| `mcp_tlbm_get_sdk_order_list` | SDK订单列表 | -| `mcp_tlbm_get_sdk_order_detail` | SDK订单详情 | +| `mcp_tlbm_query_orders` | 订单数据分页查询 | | `mcp_tlbm_get_user_roles` | 查询用户角色 | | `mcp_tlbm_get_user_by_openid` | 按OpenID查询用户 | diff --git a/src/index.ts b/src/index.ts index 670c6ce..09e9d9f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,8 @@ #!/usr/bin/env node /** * TLBM MCP Server - 无人车运营 API MCP 封装 - * - * 基于 http://localhost:8080/v3/api-docs 的 OpenAPI 规范自动生成 + * + * 基于 http://localhost:8088/v3/api-docs 的 OpenAPI 规范自动生成 * 线上服务地址: https://www.atomdancing.com/pm */ @@ -151,19 +151,20 @@ const TOOLS = [ }, endpoint: { method: "GET", path: "/api/vehicle/path/playback" }, }, + + // === 运单监控 === { - name: "get_vehicle_detail", - description: "获取车辆详细信息(含司机信息)", + name: "get_overdue_shipping", + description: "查询超时未确认装卸货的运单段", inputSchema: { type: "object", properties: { - vinId: { type: "string", description: "车牌号" }, + minutes: { type: "integer", default: 10, description: "超时阈值(分钟)" }, }, - required: ["vinId"], }, - endpoint: { method: "GET", path: "/api/rpc/vehicle/detail/{vinId}" }, + endpoint: { method: "GET", path: "/api/shipping/monitor/overdue" }, }, - + // === 订单管理 === { name: "get_order_summary", @@ -202,30 +203,20 @@ const TOOLS = [ endpoint: { method: "GET", path: "/api/order/summary/unfinished" }, }, { - name: "get_sdk_order_list", - description: "SDK查询订单列表,支持分页和状态筛选", + name: "query_orders", + description: "查询订单数据,支持分页和时间筛选", inputSchema: { type: "object", properties: { - userId: { type: "integer", description: "用户ID" }, - orderStatus: { type: "string", enum: ["IN_PROGRESS", "COMPLETED"], description: "订单状态:IN_PROGRESS=进行中,COMPLETED=已完成" }, - pageNum: { type: "integer", default: 1, description: "页码" }, - pageSize: { type: "integer", default: 10, description: "每页大小" }, + cityId: { type: "integer", description: "城市ID" }, + orderStatus: { type: "string", description: "订单状态:WAITING_DISPATCH-待派车, DISPATCHED-已派车, IN_OPERATION-装配中, COMPLETED-已完成, CANCELLED-已取消, ABNORMAL-异常" }, + startDate: { type: "string", description: "开始日期 yyyy-MM-dd,默认当天" }, + endDate: { type: "string", description: "结束日期 yyyy-MM-dd,默认当天" }, + page: { type: "integer", default: 1, description: "页码" }, + pageSize: { type: "integer", default: 20, description: "每页数量" }, }, }, - endpoint: { method: "GET", path: "/api/order/sdk/list" }, - }, - { - name: "get_sdk_order_detail", - description: "SDK查询订单详情", - inputSchema: { - type: "object", - properties: { - orderId: { type: "string", description: "订单号" }, - }, - required: ["orderId"], - }, - endpoint: { method: "GET", path: "/api/order/sdk/detail/{orderId}" }, + endpoint: { method: "GET", path: "/api/order/rpc/query" }, }, // === 用户管理 ===