Skip to main content
Glama

dsh_cancel

DestructiveIdempotent

Stop all work in a session—turns, sub-agents, background jobs, and reminders—by run_id or session_id while keeping the session and dropping queued messages.

Instructions

Stop everything a session is doing (turn, sub-agents, background jobs, reminders), by run_id or session_id; the session is kept. Messages queued in it are dropped too (removed_from_queue); to drop one queued message use dsh_update_queued (via dsh_call). Safe to repeat. Returns still_busy, activity and removed_from_queue.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "dsh_cancel"
  }
}

Input Schema

NameRequiredDescriptionDefault
run_idNoRun id from dsh_send; stops the session that run belongs to
session_idNoSession id, to stop work dsh-baton did not start

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.4
    • changedInput schema / properties / run_id / description
      Previous value: -"Run id"New value: +"Run id from dsh_send; stops the session that run belongs to"
    • changedInput schema / properties / session_id / description
      Previous value: -"Session id (to stop work dsh-baton did not start)"New value: +"Session id, to stop work dsh-baton did not start"
  2. First observedv0.5.4

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare destructiveHint=true and idempotentHint=true, but the description adds what the annotations cannot: precisely which artifacts are destroyed (turn, sub-agents, background jobs, reminders, queued messages), that the session survives, and that repeats are safe. It also names the return signals still_busy, activity and removed_from_queue, which matters because there is no output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the action and free of filler, but the single semicolon-chained sentence packs scope, alternative routing, idempotency and return fields together, which slightly hurts scanability. Nothing is wasted, though.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With two optional parameters and no output schema, an agent needs scope, destruction semantics, an alternative route and return-field names, and the description supplies all four. Nothing required to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% and the schema already explains that run_id comes from dsh_send and session_id covers work dsh-baton did not start. The description only restates "by run_id or session_id", adding no new meaning such as precedence when both are supplied, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Stop everything a session is doing" is a specific verb plus resource, and the parenthetical enumerates the exact scope (turn, sub-agents, background jobs, reminders). It also states the crucial boundary that the session itself is kept, so an agent can distinguish this from a session-destroying action.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description names the alternative explicitly: to drop a single queued message use dsh_update_queued via dsh_call, reserving dsh_cancel for whole-session stopping. That gives the agent an unambiguous routing rule between two similar-looking operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.