reachthingsDocs
EN
Dashboard
Action toolscancel_command
On this page
TOOLscope: devices:control

cancel_command

Cancels a command that has not been sent yet (waiting_approval or queued). If sending has already started, cancellation is not guaranteed and the current status is returned as is.

Arguments

command_idstringrequired

From execute_device_action.

Returns: Command

statusenum

waiting_approval queued dispatching provider_accepted verifying succeeded rejected failed cancelled expired outcome_unknown

verificationobject

level, required_level, provider_status, target_match, source, observed_at, deadline_at. See Verification.

next_actionobject

What your agent should do next: poll_command_status, open_approval_url, show_result or show_unknown, plus a message safe to show the user.

approvalobject | null

Present when status is waiting_approval: approval_id, url and expires_at. Opening the URL does not approve.

next_poll_after_msinteger | null

Wait this long before calling get_command_status.

reason_codeenum | null

Why a command ended in rejected, failed, cancelled, expired or outcome_unknown. See Reason codes.

approval_channelenum

Only for commands that needed approval: console, mcp_url or mcp_form, with approval_channel_reason when in-chat approval was not possible.

Request

REQUESTTypeScript ▾
await client.callTool({ name: "cancel_command", arguments: { command_id: "cmd_3vX9" } });
RESPONSE · structuredContent
{
  "command_id": "cmd_3vX9",
  "status": "cancelled",
  "reason_code": "user_cancelled",
  "device_id": "dev_8kq2",
  "action": "climate.set_temperature",
  "parameters": { "temperature": 22, "unit": "C" },
  "verification": { "level": "none", "required_level": "state_observed", "provider_status": "unknown", "target_match": "not_checked", "source": null, "observed_at": null, "deadline_at": null },
  "approval": null,
  "next_action": { "type": "show_result", "message": "Cancelled before it was sent." },
  "next_poll_after_ms": null,
  "expires_at": "2026-10-18T08:35:00Z"
}

Errors

Errors before a command is created return isError: true with command_id: null. Problems after creation are a command status, not an error. Full list: Errors.

CodeWhenWhat to do
COMMAND_NOT_ACCESSIBLEUnknown command or not yoursCheck the command_id
COMMAND_NOT_ACCESSIBLE
WhenUnknown command or not yours
What to doCheck the command_id