Spoke Dispatch MCP by usefulapi

Read Spoke Dispatch plans, stops, routes and drivers; create and optimize plans; send routes.

我該用這個嗎

品質與安全性

A
說明品質
97%
結構描述完整度
89%
命名品質
79%
汙染風險
100%
權限相符程度
100%
協定合規性
100%

發現項目(1)

  • LOWTool 'spoke_list_custom_stop_properties' name length outside 3-30 range在 spoke_list_custom_stop_properties 中

根據工具定義與協定合規性的自動化分析。

上下文成本

~5,993Token(工具定義)
~1.9 KB典型回應大小
顯著的注意力影響(128k 上下文的 4.68%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "spoke-dispatch": {
      "url": "https://spoke-dispatch.usefulapi.io/mcp"
    }
  }
}

遠端端點

https://spoke-dispatch.usefulapi.io/mcpstreamable-http

它能做什麼

工具清單

工具(23)

🟢 唯讀🟡 寫入🔴 刪除⚪ 未知
🟢spoke_list_plans(title, starts_on_or_after, filter, max_page_size, page_token)

List route plans (a plan = one day's delivery job: date, depot, drivers, routes), newest first, in pages of up to 20. Filter with e.g. {"title":"Monday run"} or {"startsGte":"2026-10-01"}. GET /plans.

輸入結構描述

{
  "type": "object",
  "properties": {
    "title": {
      "description": "Only plans with this title.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "starts_on_or_after": {
      "description": "Only plans starting on or after this date (yyyy-mm-dd).",
      "type": "string",
      "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
    },
    "filter": {
      "description": "Extra filter fields as documented by Spoke (name -> value), e.g. {\"startsGte\":\"2026-10-01\"}.",
      "type": "object",
      "propertyNames": {
        "type": "string"
      },
      "additionalProperties": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 200
          },
          {
            "type": "boolean"
          }
        ]
      }
    },
    "max_page_size": {
      "description": "Results per page, 1-20 (default 10).",
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "page_token": {
      "description": "Page token: pass the previous reply's nextPageToken (with the same other arguments) for the next page.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_get_plan(plan_id)

One plan: title, start date, depot, driver ids, route ids, whether it is distributed/writable, optimization state and route overrides. GET /plans/{planId}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Plan id, e.g. 'abc123' or 'plans/abc123'."
    }
  },
  "required": [
    "plan_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_list_plan_stops(plan_id, recipient_external_id, max_page_size, page_token)

List the stops of a plan, in pages of up to 10. Stops include recipient names, phones, e-mails and addresses (personal data): page only as far as needed. GET /plans/{planId}/stops.

輸入結構描述

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "recipient_external_id": {
      "description": "Only stops whose recipient has this external id.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "max_page_size": {
      "description": "Results per page, 1-10 (default 10).",
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "page_token": {
      "description": "Page token: pass the previous reply's nextPageToken (with the same other arguments) for the next page.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "required": [
    "plan_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_get_stop(plan_id, stop_id)

One stop of a plan with address, recipient, timing, ETA, route and delivery outcome (attempted, succeeded, notes, photo/signature links). Contains personal data. GET /plans/{planId}/stops/{stopId}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "stop_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Stop id, e.g. 'xyz' or 'plans/abc/stops/xyz'."
    }
  },
  "required": [
    "plan_id",
    "stop_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_search_stops(keyword, filter, sort_field, sort_order, max_page_size, ...)

Search all stops of the team (planned, unassigned, past) by keyword and/or Spoke's filter language, up to 20 per page. Example filter: address.countryCode = "DE" and deliveryInfo.attempted = false. Filterable: planId, routeId, type, activity, notes, address.*, createdAt, recipient.name/email/phone/externalId, deliveryInfo.state/attempted/succeeded, orderInfo.*. Results include personal data. The search index lags real time by a short while. GET /stops:search.

輸入結構描述

{
  "type": "object",
  "properties": {
    "keyword": {
      "description": "Fuzzy full-text keywords.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "filter": {
      "description": "Spoke filter expression, e.g. createdAt >= \"2026-10-01T00:00:00Z\" and address ~= \"London\".",
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "sort_field": {
      "type": "string",
      "enum": [
        "address.latitude",
        "address.longitude",
        "createdAt",
        "arrivalAt",
        "packageCount",
        "estimatedTravelDuration",
        "estimatedTravelDistance",
        "timing.estimatedAttemptDuration",
        "deliveryInfo.attemptedAt",
        "paymentOnDelivery.amount"
      ]
    },
    "sort_order": {
      "type": "string",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "max_page_size": {
      "description": "Results per page, 1-20 (default 20).",
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "page_token": {
      "description": "Page token: pass the previous reply's nextPageToken (with the same other arguments) for the next page.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_list_unassigned_stops(max_page_size, page_token)

List stops that are not on any plan yet (the inbox of imported orders), in pages of up to 20 (default 20). Contains personal data. GET /unassignedStops.

輸入結構描述

{
  "type": "object",
  "properties": {
    "max_page_size": {
      "description": "Results per page, 1-20 (default 20).",
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "page_token": {
      "description": "Page token: pass the previous reply's nextPageToken (with the same other arguments) for the next page.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_get_unassigned_stop(unassigned_stop_id)

One unassigned stop by id. Contains personal data. GET /unassignedStops/{id}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "unassigned_stop_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200,
      "description": "Id, e.g. 'abc' or 'unassignedStops/abc'."
    }
  },
  "required": [
    "unassigned_stop_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_list_drivers(active, max_page_size, page_token)

List the team's drivers (name, e-mail/phone, active flag, depots, route overrides), up to 50 per page. Contains personal data. GET /drivers.

輸入結構描述

{
  "type": "object",
  "properties": {
    "active": {
      "description": "Only active (true) or inactive (false) drivers.",
      "type": "boolean"
    },
    "max_page_size": {
      "description": "Results per page, 1-50 (default 50).",
      "type": "integer",
      "minimum": 1,
      "maximum": 50
    },
    "page_token": {
      "description": "Page token: pass the previous reply's nextPageToken (with the same other arguments) for the next page.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_get_driver(driver_id)

One driver by id. Contains personal data. GET /drivers/{driverId}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "driver_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Driver id, e.g. 'abc' or 'drivers/abc'."
    }
  },
  "required": [
    "driver_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_list_depots(max_page_size, page_token)

List depots (start/end addresses, working hours, vehicle type, max stops), up to 20 per page. Use the ids when creating plans. GET /depots.

輸入結構描述

{
  "type": "object",
  "properties": {
    "max_page_size": {
      "description": "Results per page, 1-20 (default 20).",
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "page_token": {
      "description": "Page token: pass the previous reply's nextPageToken (with the same other arguments) for the next page.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_get_depot(depot_id)

One depot by id. GET /depots/{depotId}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "depot_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Depot id, e.g. 'abc' or 'depots/abc'."
    }
  },
  "required": [
    "depot_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_list_routes(starts_on_or_after, max_page_size, page_token)

List routes (one driver's run of a plan: stop count, driver, distributed/started/completed state), up to 20 per page. GET /routes.

輸入結構描述

{
  "type": "object",
  "properties": {
    "starts_on_or_after": {
      "description": "Only routes of plans starting on or after this date (yyyy-mm-dd).",
      "type": "string",
      "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
    },
    "max_page_size": {
      "description": "Results per page, 1-20 (default 20).",
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "page_token": {
      "description": "Page token: pass the previous reply's nextPageToken (with the same other arguments) for the next page.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_get_route(route_id)

One route: title, driver, stop count and state (distributed, started, completed, recipients notified). GET /routes/{routeId}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "route_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Route id, e.g. 'abc' or 'routes/abc'."
    }
  },
  "required": [
    "route_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_list_route_stops(route_id, recipient_external_id, max_page_size, page_token)

List the stops of one route in driving order, in pages of up to 10. Contains personal data: page only as far as needed. GET /routes/{routeId}/stops.

輸入結構描述

{
  "type": "object",
  "properties": {
    "route_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "recipient_external_id": {
      "description": "Only stops whose recipient has this external id.",
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "max_page_size": {
      "description": "Results per page, 1-10 (default 10).",
      "type": "integer",
      "minimum": 1,
      "maximum": 10
    },
    "page_token": {
      "description": "Page token: pass the previous reply's nextPageToken (with the same other arguments) for the next page.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "required": [
    "route_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_list_operations(max_page_size, page_token)

List long-running operations (plan optimizations): type, done flag, who started it, result (optimized and skipped stops), up to 20 per page. GET /operations.

輸入結構描述

{
  "type": "object",
  "properties": {
    "max_page_size": {
      "description": "Results per page, 1-20 (default 20).",
      "type": "integer",
      "minimum": 1,
      "maximum": 20
    },
    "page_token": {
      "description": "Page token: pass the previous reply's nextPageToken (with the same other arguments) for the next page.",
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    }
  },
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_get_operation(operation_id)

One operation, e.g. the optimization started by spoke_optimize_plan: poll until done is true. GET /operations/{operationId}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "operation_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120,
      "description": "Operation id, e.g. 'abc' or 'operations/abc'."
    }
  },
  "required": [
    "operation_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟢spoke_list_custom_stop_properties

The team's custom stop property definitions (ids and names). Their ids are the keys of customProperties on stops. Needs a subscription that includes custom properties (HTTP 403 otherwise). GET /team/customStopProperties.

輸入結構描述

{
  "type": "object",
  "properties": {},
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡spoke_create_plan(title, starts_on, driver_ids, depot_id)

WRITE: create a new route plan for a date (no stops yet, nothing is sent to drivers). Optionally assign drivers (up to 50, they must be active and share the plan's depot) and a depot (default: the team's main depot). Does not optimize or distribute. POST /plans.

輸入結構描述

{
  "type": "object",
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "starts_on": {
      "type": "string",
      "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$",
      "description": "Plan date, yyyy-mm-dd (Spoke rejects dates too far in the past or future)."
    },
    "driver_ids": {
      "description": "Driver ids ('abc' or 'drivers/abc').",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 60
      }
    },
    "depot_id": {
      "description": "Depot id ('abc' or 'depots/abc').",
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    }
  },
  "required": [
    "title",
    "starts_on"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴spoke_update_plan(plan_id, title, starts_on, driver_ids, depot_id)

WRITE: change a plan's title, date, drivers and/or depot. Only the fields you pass change, but driver_ids REPLACES the plan's whole driver list. Fails if the plan is not writable (already distributed). Nothing is sent to drivers. PATCH /plans/{planId}.

輸入結構描述

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "title": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255
    },
    "starts_on": {
      "type": "string",
      "pattern": "^(\\d{4})-(\\d{2})-(\\d{2})$"
    },
    "driver_ids": {
      "description": "The complete new driver list (replaces the old one).",
      "maxItems": 50,
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1,
        "maxLength": 60
      }
    },
    "depot_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 60
    }
  },
  "required": [
    "plan_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡spoke_create_stop(plan_id, stop)

WRITE: add one stop to a writable (not yet distributed) plan. Needs an address (text fields or latitude+longitude). The recipient's phone/e-mail are stored on the stop and Spoke may contact the recipient later when the route runs; nothing is sent now. For many stops use spoke_import_stops. POST /plans/{planId}/stops.

輸入結構描述

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "stop": {
      "type": "object",
      "properties": {
        "address": {
          "type": "object",
          "properties": {
            "address_name": {
              "description": "Display name only (not used for geocoding), e.g. 'Rear entrance'.",
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "address_line_one": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "address_line_two": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            },
            "city": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "state": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "zip": {
              "type": "string",
              "minLength": 1,
              "maxLength": 40
            },
            "country": {
              "type": "string",
              "minLength": 1,
              "maxLength": 100
            },
            "latitude": {
              "description": "Overrides the text fields; give both latitude and longitude or neither.",
              "type": "number",
              "minimum": -90,
              "maximum": 90
            },
            "longitude": {
              "type": "number",
              "minimum": -180,
              "maximum": 180
            }
          },
          "description": "Stop address. Give at least one field; the more fields, the better the geocoding."
        },
        "recipient_name": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        "recipient_phone": {
          "description": "Recipient phone (E.164 preferred). Stored on the stop; Spoke may text it when the route runs.",
          "type": "string",
          "minLength": 3,
          "maxLength": 40
        },
        "recipient_email": {
          "description": "Recipient e-mail. Stored on the stop; Spoke may e-mail tracking updates when the route runs.",
          "type": "string",
          "maxLength": 254,
          "format": "email",
          "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
        },
        "recipient_external_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        "notes": {
          "description": "Notes for the driver.",
          "type": "string",
          "minLength": 1,
          "maxLength": 2000
        },
        "package_count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 10000
        },
        "activity": {
          "description": "Default delivery.",
          "type": "string",
          "enum": [
            "delivery",
            "pickup"
          ]
        },
        "optimization_order": {
          "description": "Force the stop first or last in the optimized route.",
          "type": "string",
          "enum": [
            "default",
            "first",
            "last"
          ]
        },
        "earliest_attempt_time": {
          "description": "Time window start, HH:MM (local time of the stop).",
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
        },
        "latest_attempt_time": {
          "description": "Time window end, HH:MM.",
          "type": "string",
          "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
        },
        "estimated_attempt_duration_seconds": {
          "description": "Expected time at the stop, in seconds.",
          "type": "integer",
          "minimum": 1,
          "maximum": 28800
        },
        "allowed_driver_ids": {
          "description": "Only these drivers (ids or 'drivers/<id>'; they must be on the plan) may serve the stop.",
          "maxItems": 50,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 60
          }
        },
        "seller_order_id": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        "invoice_number": {
          "type": "string",
          "minLength": 1,
          "maxLength": 255
        },
        "products": {
          "description": "Product names for the stop.",
          "maxItems": 100,
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          }
        }
      },
      "required": [
        "address"
      ]
    }
  },
  "required": [
    "plan_id",
    "stop"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🟡spoke_import_stops(plan_id, stops)

WRITE: add up to 100 stops to a writable (not yet distributed) plan in one request (better geocoding than one at a time; Spoke limits imports to 30 requests a minute). Returns the created stop ids and any failures. Recipient contact data is stored on the stops; nothing is sent now. POST /plans/{planId}/stops:import.

輸入結構描述

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "stops": {
      "minItems": 1,
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "address": {
            "type": "object",
            "properties": {
              "address_name": {
                "description": "Display name only (not used for geocoding), e.g. 'Rear entrance'.",
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "address_line_one": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "address_line_two": {
                "type": "string",
                "minLength": 1,
                "maxLength": 255
              },
              "city": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "state": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "zip": {
                "type": "string",
                "minLength": 1,
                "maxLength": 40
              },
              "country": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              },
              "latitude": {
                "description": "Overrides the text fields; give both latitude and longitude or neither.",
                "type": "number",
                "minimum": -90,
                "maximum": 90
              },
              "longitude": {
                "type": "number",
                "minimum": -180,
                "maximum": 180
              }
            },
            "description": "Stop address. Give at least one field; the more fields, the better the geocoding."
          },
          "recipient_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "recipient_phone": {
            "description": "Recipient phone (E.164 preferred). Stored on the stop; Spoke may text it when the route runs.",
            "type": "string",
            "minLength": 3,
            "maxLength": 40
          },
          "recipient_email": {
            "description": "Recipient e-mail. Stored on the stop; Spoke may e-mail tracking updates when the route runs.",
            "type": "string",
            "maxLength": 254,
            "format": "email",
            "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
          },
          "recipient_external_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "notes": {
            "description": "Notes for the driver.",
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          },
          "package_count": {
            "type": "integer",
            "minimum": 1,
            "maximum": 10000
          },
          "activity": {
            "description": "Default delivery.",
            "type": "string",
            "enum": [
              "delivery",
              "pickup"
            ]
          },
          "optimization_order": {
            "description": "Force the stop first or last in the optimized route.",
            "type": "string",
            "enum": [
              "default",
              "first",
              "last"
            ]
          },
          "earliest_attempt_time": {
            "description": "Time window start, HH:MM (local time of the stop).",
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
          },
          "latest_attempt_time": {
            "description": "Time window end, HH:MM.",
            "type": "string",
            "pattern": "^([01]\\d|2[0-3]):([0-5]\\d)$"
          },
          "estimated_attempt_duration_seconds": {
            "description": "Expected time at the stop, in seconds.",
            "type": "integer",
            "minimum": 1,
            "maximum": 28800
          },
          "allowed_driver_ids": {
            "description": "Only these drivers (ids or 'drivers/<id>'; they must be on the plan) may serve the stop.",
            "maxItems": 50,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60
            }
          },
          "seller_order_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "invoice_number": {
            "type": "string",
            "minLength": 1,
            "maxLength": 255
          },
          "products": {
            "description": "Product names for the stop.",
            "maxItems": 100,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 255
            }
          }
        },
        "required": [
          "address"
        ]
      }
    }
  },
  "required": [
    "plan_id",
    "stops"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴spoke_optimize_plan(plan_id)

WRITE: start the route optimization of a plan (orders and assigns its stops to its drivers). Rewrites the plan's routes if it was optimized before, and uses Spoke's optimization quota (30 per minute, 100 per 10 minutes). Does NOT send anything to drivers. Returns an operation: poll spoke_get_operation until done. Needs at least one driver and one stop. POST /plans/{planId}:optimize.

輸入結構描述

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    }
  },
  "required": [
    "plan_id"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}
🔴spoke_distribute_plan(plan_id, confirm_send_to_drivers)

WRITE (SENDS TO REAL PEOPLE): distribute an optimized plan, which immediately sends each driver of the plan their route on their phone (push notification / message) and locks the plan for edits. Cannot be undone. Only for a plan with 1-10 drivers, and only after the user has explicitly said to send the routes: set confirm_send_to_drivers to true. POST /plans/{planId}:distribute.

輸入結構描述

{
  "type": "object",
  "properties": {
    "plan_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 120
    },
    "confirm_send_to_drivers": {
      "type": "boolean",
      "const": true,
      "description": "Must be true: confirms the user asked to send the routes to the plan's drivers now."
    }
  },
  "required": [
    "plan_id",
    "confirm_send_to_drivers"
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema"
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本23 個工具