feat(v2.6.0): authentic 4-courier cancellation, 3-column docs and AI connector fixes
This commit is contained in:
+4
-2
@@ -167,12 +167,13 @@ export const TOOLS: Tool[] = [
|
||||
{
|
||||
name: "cancel_parcel",
|
||||
description:
|
||||
"Request cancellation for an existing parcel consignment on Steadfast, Pathao, RedX, or Paperfly. Returns structured 'UNSUPPORTED_BY_PROVIDER' guidance when the carrier's public API does not expose an automated cancellation endpoint, instructing the operator to cancel in the merchant portal.",
|
||||
"Cancel an existing parcel consignment across Steadfast, Pathao, RedX, or Paperfly. For carriers with automated cancellation APIs (Pathao, RedX, Paperfly), executes live upstream cancellation immediately. For Steadfast, validates parcel eligibility, marks internal status as CANCEL_REQUESTED, and provides direct portal action links.",
|
||||
inputSchema: {
|
||||
type: "object",
|
||||
properties: {
|
||||
courier: { type: "string", enum: ["steadfast", "pathao", "redx", "paperfly"], description: "Courier provider name" },
|
||||
consignment_id: { type: "string", description: "Consignment ID or tracking code to cancel" },
|
||||
reason: { type: "string", description: "Optional cancellation reason (e.g. 'Customer cancelled', 'Address incorrect')" },
|
||||
},
|
||||
required: ["courier", "consignment_id"],
|
||||
},
|
||||
@@ -334,7 +335,8 @@ export async function executeToolCall(
|
||||
case "cancel_parcel": {
|
||||
const result = await registry.cancelParcel(
|
||||
args?.courier as SupportedCourier,
|
||||
String(args?.consignment_id ?? "")
|
||||
String(args?.consignment_id ?? ""),
|
||||
args?.reason ? String(args.reason) : undefined
|
||||
);
|
||||
return { isError: false, envelope: wrapSuccess(result, "live_api") };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user