Skip to main content
Glama

dsh_wait

Read-onlyIdempotent

Waits for DeepSeek Harness runs started with dsh_send to finish and returns their state and final reply, flagging runs that need human input or approval.

Instructions

Wait for a run sent with dsh_send to end and return its state and final reply. Prefer the background wait_command from dsh_send if your client wakes you when a background command exits: it costs no turns. For a run a background wait_command already waits for, dsh_wait returns at once without waiting: do not call it for that run. It also returns at once when the run stops to ask a person: needs_input answer (reply with dsh_answer) or harness-ui (an approval in the Harness window). Each call waits up to 50 s; if it returns timed_out: true, call dsh_wait again with the same run_id, without a progress note. Parallel runs: all ids in run_ids, never one by one; returns once any ends or asks (ended; the rest in still_running); then wait again with the rest plus your fixes. A run in a session with a Harness goal is followed on until the goal stops, with every round since the run began. With session_id instead of run_id it follows that session's Harness goal (see until) without sending anything; it also returns when Harness needs a person or will not go on by itself. Pass back the cursor each result gives.

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_wait"
  }
}

Input Schema

NameRequiredDescriptionDefault
untilNoHarness goal: goal (default) reports once when it stops; turn (only if the user asked for progress reports) at a round end once every_minutes passed since the last report, with every round since
cursorNoThe cursor from the previous result (nothing is reported twice or missed)
run_idNoRun id from dsh_send
run_idsNoSeveral run ids, to wait for whichever ends first
session_idNoFollow this session's Harness goal instead of waiting for a run (no message is sent)
every_minutesNoWith until turn: least minutes between reports

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.6.11
    • changedInput schema / properties / cursor / description
      Previous value: -"The cursor from the previous result, so nothing is reported twice or missed (also when switching until)"New value: +"The cursor from the previous result (nothing is reported twice or missed)"
    • addedInput schema / properties / run_ids
      Added value: +{
      +  "description": "Several run ids, to wait for whichever ends first",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  2. Changed5 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "description": "The cursor from the previous result, so nothing is reported twice or missed (also when switching until)",
      +  "type": "string"
      +}
    • addedInput schema / properties / every_minutes
      Added value: +{
      +  "default": 10,
      +  "description": "With until turn: least minutes between reports",
      +  "type": "integer"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Follow this session's Harness goal instead of waiting for a run (no message is sent)",
      +  "type": "string"
      +}
    • addedInput schema / properties / until
      Added value: +{
      +  "description": "Harness goal: goal (default) reports once when it stops; turn (only if the user asked for progress reports) at a round end once every_minutes passed since the last report, with every round since",
      +  "enum": [
      +    "goal",
      +    "turn"
      +  ],
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "run_id"
      -]
  3. First observedv0.5.4

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive, so the safety profile is covered; the description adds substantial behavior beyond that: the 50 s per-call cap, the timed_out flag, immediate return when a run requests human input (needs_input vs harness-ui), and the session_id mode that follows a Harness goal until it stops. The remaining gap is that return payload shape is described only piecemeal (still_running, cursor), but this is minor against an otherwise rich disclosure.

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?

Purpose is front-loaded in the first sentence and nearly every sentence carries operational information (timeout, re-call, parallel strategy, session mode). The prose is dense and clause-heavy with colons and semicolons, which makes it harder to scan than it needs to be, but there is little genuine 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 six-parameter tool with no required parameters and no output schema, the description covers everything an agent needs to call it correctly: timeout and retry behavior, the three result categories (ended, still_running, needs input), parallel vs single-run modes, and cursor continuity. Nothing material about invocation or result handling is left to inference.

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; the description still adds meaning, notably that run_ids waits for whichever run ends or asks first with the rest returned in still_running, that session_id sends nothing, and that the cursor from each result must be passed back to avoid missed or duplicated reports. It largely restates the until enum semantics already in the schema, which keeps it from a 5.

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?

Opens with a specific verb and resource: wait for a run sent with dsh_send to end, returning its state and final reply. It also disambiguates from the background wait_command mechanism and from the sibling dsh_answer (used when the run asks for a person), so an agent can tell what this tool is and is not 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 Guidelines5/5

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

Gives explicit when-to-use and when-not-to-use rules: prefer the background wait_command when the client wakes on exit because it costs no turns; do not call dsh_wait for a run a background wait_command already covers; use dsh_answer for needs_input; use run_ids in parallel rather than one by one. It also states the 50 s timeout and the re-call pattern, which is exactly the decision an agent must make after a timed_out result.

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