Skip to main content
Glama

dsh_send

Dispatch a task to an existing agent conversation and get a run ID plus sentinel file for background completion; set wait=true to block for the result, with timeouts falling back to background.

Instructions

向会话派一个任务。默认不阻塞(wait=false):立即返回 run_id + sentinel_file,回合在后台跑,跑完自动通知你 —— 你继续做别的事,也永远不用担心任务被"超时"打断。想原地等结果就显式传 wait=true(可配 timeout_ms;到期只会转后台,不会取消回合)。【超时不会毁掉任务】wait=true 到达 timeout_ms 仍没跑完时,本工具不会报错、也不会取消回合,而是自动降级为后台:返回 run_id + sentinel_file,回合继续跑完,结果稍后由哨兵文件通知。(timeout_ms=0 表示一直等。)所以任何时候你都能拿到结果,不用怕"超时了白干"。等待模式与后台模式都在回合结束时原子落地一个含最终结果的小文件——推荐用后台任务(Bash run_in_background + until [ -f sentinel_file ])等它,跑完自动通知你,无需轮询;文件出现后读它即得结果,或用 dsh_get(conversation_id, run_id) 验收,dsh_read 可中途看输出。默认隐藏思考内容(只返回正文 + 思考统计)。若会话正在忙,本工具会报错——改用 dsh_interject 插话,或用 dsh_interrupt 先打断。

Input Schema

NameRequiredDescriptionDefault
waitNo**默认 false**:立即返回 run_id + sentinel_file,回合在后台跑,跑完由哨兵文件通知(推荐用法)。true = 原地阻塞到回合结束再返回完整结果。
promptYes任务描述。可以引用工作区里的文件路径。
reasoningNo思考内容展示档位。默认 hide(只返回正文,思考只给统计)。full 会占用大量上下文。
timeout_msNo仅 wait=true 时的**等待**上限(毫秒),默认 30 分钟;0 = 一直等。到期不会取消回合,只会转成后台并给你 run_id。
conversation_idYes会话 id,来自 dsh_start 或 dsh_list。

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

No annotations exist, so the description carries the full burden and does so: it discloses that a timeout does not error and does not cancel the turn but degrades to background, that results land atomically in a sentinel file, that reasoning is hidden by default with a context-cost warning for `full`, and that a busy conversation produces an error. These are non-obvious failure-mode behaviors an agent could not infer from the schema.

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

Conciseness3/5

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

The default non-blocking behavior is correctly front-loaded, but the same point — that timeouts never destroy the task — is made three separate times with heavy bolding, and the result-retrieval mechanics appear twice. Substantial length is spent on emphasis rather than new information.

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 dispatch tool with no annotations and no output schema, the description covers everything needed: what is returned (run_id + sentinel_file), how to obtain the final result (sentinel file, dsh_get, dsh_read mid-run), default reasoning visibility, and the error path. An agent has no unanswered question before calling it.

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 description coverage is 100% and the per-parameter descriptions already cover the wait default, timeout_ms degradation semantics, reasoning levels, and conversation_id provenance. The prose largely restates those same facts rather than adding new meaning, so the baseline 3 applies; the only marginal addition is the cross-parameter framing that timeout_ms matters solely when wait=true.

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 opening sentence names a specific verb and resource (dispatch a task to a conversation) and immediately distinguishes the tool's two modes. It also names the siblings it is not for the busy case (dsh_interject, dsh_interrupt) and the verification path (dsh_get, dsh_read), so an agent can place it in the family without opening other schemas.

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?

Explicit when-to-use: default wait=false for fire-and-forget, explicit wait=true to block in place, and a recommended Bash run_in_background + `until [ -f sentinel_file ]` pattern instead of polling. It also states the negative case — if the conversation is busy the tool errors and you should use dsh_interject or dsh_interrupt — which is exactly the alternative routing an agent needs.

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