Skip to main content
Glama

dsh_interject

Inject a message into an active agent turn to interrupt and redirect it, or queue it to send after the current turn ends. When idle, it behaves like a normal send.

Instructions

插话:会话正在跑某个回合时往里补一句话。两种模式——interject(默认)打断当前回合并立刻改口;queue 不打断,等本轮自然结束后紧接着说。会话空闲时等同于一次普通 dsh_send。说明:ACP 明确拒绝并发 prompt,所以做不到"让模型在同一个回合里即时改向";interject 是它的实用等价物(取消 + 立刻开新回合,历史完整保留)。

Input Schema

NameRequiredDescriptionDefault
modeNointerject(默认)= 打断并改口;queue = 等本轮跑完接着说。
messageYes要插进去说的话。
reasoningNo思考内容展示档位,默认 hide。
timeout_msNo新回合的**等待**上限(毫秒),默认 30 分钟;0 = 一直等。到期转后台,不取消回合。
conversation_idYes会话 id,来自 dsh_start 或 dsh_list。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the load well: it discloses that interject cancels the in-flight turn and starts a new one, that history is preserved, and that ACP's no-concurrent-prompt rule makes true mid-turn steering impossible. It omits what the caller actually receives back (the full turn result vs. a background acknowledgement) and any permission/auth expectations.

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

Conciseness5/5

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

Front-loaded with the core definition, then modes, then the ACP caveat that justifies the design. Every clause carries information; the closing note on why true in-turn redirection is impossible preempts a likely agent misconception.

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

Completeness4/5

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

For a 5-parameter mutation tool with no annotations and no output schema, the description covers the semantics and the important side effect (current turn cancelled). The missing piece is return shape — whether interject is synchronous with the reply or returns after handoff, which matters given timeout_ms can push work to the background.

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 both enums are documented inline, so the description's restatement of mode semantics adds little beyond structured data. The one genuinely additive point is the idle-conversation equivalence for mode, but the timeout_ms background-expiry behavior is only in the schema.

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?

The description opens with a precise verb+resource: injecting a message into a conversation that is mid-turn, and immediately enumerates the two behavioral modes. It implicitly demarcates itself from dsh_send by stating the idle-conversation equivalence, so an agent can place it against siblings without opening the schema.

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

Usage Guidelines4/5

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

Clear conditions are given: use it when a turn is running, pick interject to cancel-and-redirect, pick queue to append after the turn, and fall back to dsh_send when idle. The gap is that it never explicitly contrasts with dsh_interrupt or dsh_takeover, which are the closest competing behaviors for the 'cancel the current turn' case.

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