Skip to main content
Glama

Interject

dsh_interject
Destructive

Steer a running conversation by stopping its current turn and redirecting at once, or queue a message to speak after the turn ends; the call blocks until the new turn completes.

Instructions

Say something to a conversation while it is running a turn. This tool blocks until the new turn ends (it moves to the background only when timeout_ms expires). Two modes: interject (default) stops the current turn and redirects at once; queue does not stop it and speaks right after the current turn ends naturally (without using the dsh_queue queue). To stop without saying anything use dsh_interrupt; to run after the current turn without blocking use dsh_send(queue=true). On an idle conversation it runs as an ordinary wait=true turn (full result, not a receipt). Note: ACP refuses concurrent prompts, so steering the model inside the same turn is not possible; interject is the practical equivalent (cancel, then start a new turn immediately, with history intact).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "conversation_id": "<conversation_id>",
      "message": "<message>"
    },
    "name": "dsh_interject"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNointerject (default) = stop and redirect; queue = speak after the current turn finishes.
reviewNoReview policy for this turn, overriding the conversation default (advisory); off skips the review ticket this time.
messageYesWhat to say.
reasoningNoHow much reasoning to return. Default hide.
timeout_msNoUpper bound on **waiting** for the new turn, in milliseconds. **Default 0 = wait forever**; in queue mode it also bounds the wait for the previous turn to end. While busy, a wait that times out is an error (the message was not sent and the conversation is unharmed); when idle, expiry only moves the turn to the background without cancelling it.
client_run_idNoCaller-generated idempotency key (up to 128 characters, scoped to this conversation). Submitting it again returns the first run instead of interjecting twice.
conversation_idYesConversation id, from dsh_start or dsh_list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv0.6.8
    • changedInput schema / properties / client_run_id / description
      Previous value: -"调用方生成的幂等键(≤128 字符,作用域=本会话)。重复提交返回首次的 run,不会重复插话。"New value: +"Caller-generated idempotency key (up to 128 characters, scoped to this conversation). Submitting it again returns the first run instead of interjecting twice."
    • changedInput schema / properties / conversation_id / description
      Previous value: -"会话 id,来自 dsh_start 或 dsh_list。"New value: +"Conversation id, from dsh_start or dsh_list."
    • changedInput schema / properties / message / description
      Previous value: -"要插进去说的话。"New value: +"What to say."
    • changedInput schema / properties / mode / description
      Previous value: -"interject(默认)= 打断并改口;queue = 等本轮跑完接着说。"New value: +"interject (default) = stop and redirect; queue = speak after the current turn finishes."
    • changedInput schema / properties / reasoning / description
      Previous value: -"思考内容展示档位,默认 hide。"New value: +"How much reasoning to return. Default hide."
    • changedInput schema / properties / review / description
      Previous value: -"本次插话回合的审核策略,覆盖会话默认(默认 advisory);off 可关闭本次审核单。"New value: +"Review policy for this turn, overriding the conversation default (advisory); off skips the review ticket this time."
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"新回合的**等待**上限(毫秒),**默认 0 = 一直等**;queue 模式也用它限制等待上一轮结束。忙时等待超时会报错(本次插话未发送,会话不受损);空闲时到期只转后台,不取消回合。"New value: +"Upper bound on **waiting** for the new turn, in milliseconds. **Default 0 = wait forever**; in queue mode it also bounds the wait for the previous turn to end. While busy, a wait that times out is an error (the message was not sent and the conversation is unharmed); when idle, expiry only moves the turn to the background without cancelling it."
  2. Changed3 schema fields changedv0.5.1
    • addedInput schema / properties / client_run_id
      Added value: +{
      +  "description": "调用方生成的幂等键(≤128 字符,作用域=本会话)。重复提交返回首次的 run,不会重复插话。",
      +  "maxLength": 128,
      +  "type": "string"
      +}
    • addedInput schema / properties / review
      Added value: +{
      +  "description": "本次插话回合的审核策略,覆盖会话默认(默认 advisory);off 可关闭本次审核单。",
      +  "enum": [
      +    "off",
      +    "advisory"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / timeout_ms / description
      Previous value: -"新回合的**等待**上限(毫秒),默认 30 分钟;0 = 一直等。到期转后台,不取消回合。"New value: +"新回合的**等待**上限(毫秒),**默认 0 = 一直等**;queue 模式也用它限制等待上一轮结束。忙时等待超时会报错(本次插话未发送,会话不受损);空闲时到期只转后台,不取消回合。"
  3. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

Annotations only declare destructiveHint/openWorldHint/not-idempotent; the description goes well beyond by disclosing that the call blocks until the new turn ends, moves to background only on timeout, and that a timeout while busy is an error with the message unsent and the conversation unharmed. The client_run_id idempotency clarification also usefully qualifies the blanket idempotentHint=false, though it stops short of describing the returned payload shape beyond 'full result, not a receipt'.

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-loads the single most important behavioral fact (blocking) and uses bold for the two facts an agent is most likely to get wrong (blocks-until-end, wait=true on idle). It is dense — several clauses per sentence — but every sentence carries operative information rather than filler.

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?

For a 7-parameter, destructive, blocking tool with no output schema, the description covers the blocking model, both modes, timeout edge cases, the idle fallback, idempotency, and the underlying ACP constraint. Nothing an agent needs in order to invoke it correctly and interpret its blocking or failure behavior is missing.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds cross-parameter meaning the schema does not: timeout_ms doubles as a bound on waiting for the previous turn in queue mode, and expiry behaves differently when busy (error) versus idle (backgrounded, not cancelled). Mode/review/reasoning themselves are left to the schema, which already covers them well.

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?

States a concrete verb and resource ('Say something to a conversation while it is running a turn') and immediately splits the behavior into its two named modes, interject vs queue. It explicitly separates itself from dsh_interrupt (stop silently) and dsh_send(queue=true) (non-blocking), so an agent can pick it without inspecting siblings.

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?

Gives explicit when-to-use (redirect a running turn), when-not/alternative (dsh_interrupt for silent stop, dsh_send(queue=true) for non-blocking), and the edge case of an idle conversation where it degrades to an ordinary wait=true turn. The ACP concurrency note explains why interject exists at all rather than steering in-place.

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