Skip to content

cancel_standing_order

Status: Implemented | Module: trip

Cancel a standing order (recurring trip schedule). Implements the same single-tool two-step pattern as cancel_trip: omit reason to fetch the available reasons; pass reason to fuzzy-match and cancel. Cancels all FUTURE trips in the standing order — already-created trips from the order are not automatically cancelled.

Call cancel_standing_order WITHOUT reason. The use case fetches the available cancellation reasons and returns them in available_reasons. No cancellation is performed.

Call again WITH reason set to the chosen reason name OR reason_id. Same matcher as cancel_trip (case-insensitive id → exact name → substring → UUID/numeric pass-through). Some reasons require an additional reason_description.

Hint Value
readOnlyHint false
destructiveHint true
idempotentHint false
Field Type Required Description
session_id string yes Active session
order_id string yes Standing order UUID from get_standing_orders
reason string no Reason name OR reason_id. Omit to fetch the list of available reasons.
reason_description string no Free-text explanation. Required when the matched reason has description_required: true.

The output is a discriminated wrapper — exactly one of the two shapes below is populated.

Field Type Description
status string success
available_reasons CancellationReason[] Available reasons (reason_id, name, description_required)
message string Pick-one prompt
Field Type Description
status string success
order_id string Cancelled order UUID
message string Confirmation message
{
"params": {
"name": "cancel_standing_order",
"arguments": { "session_id": "a1b2c3d4-...", "order_id": "so-uuid-001" }
}
}
{
"params": {
"name": "cancel_standing_order",
"arguments": { "session_id": "a1b2c3d4-...", "order_id": "so-uuid-001", "reason": "Treatment completed" }
}
}