Skip to main content
Glama
gaztrabisme

deepseek-subagent-mcp

by gaztrabisme

deepseek-subagent-mcp

为 Claude Code、Codex 或任何其他 MCP 客户端提供一个 DeepSeek Harness 代理,使其可以像委托给自身子代理一样向其委托工作。

MCP(模型上下文协议)是编码代理加载外部工具的标准。DeepSeek Harness 是 DeepSeek 的开源代理运行时——一个带有文件和 Shell 工具的循环模型,于 2026 年 8 月以 MIT 许可证发布。此服务器位于两者之间:它在独立的进程中运行一个 Harness 代理,并暴露六个工具用于启动、观察、继续和停止它。

子代理拥有自己的上下文窗口。这正是其意义所在——你交给它一个独立的任务,它会消耗自己的 token 处理文件,而你会得到结果而不是对话记录。

要求

  • Python 3.11 或更新版本

  • 来自 platform.deepseek.com 的 DeepSeek API 密钥

  • Apple Silicon 上的 macOS 14+,或 x86-64 / arm64 架构的 Linux

无需安装 Node.js:Harness 运行时作为自包含的可执行文件内置于 deepseek-harness-sdk wheel 中。该 wheel 也是平台限制——它仅发布 macosx_14_0_arm64、manylinux_2_28_x86_64 和 manylinux_2_28_aarch64,因此 Windows、Intel Mac 和 macOS 13 完全无法安装。

Related MCP server: dsh-crew

安装

uvx --from git+https://github.com/gaztrabisme/deepseek-subagent-mcp deepseek-subagent-mcp

Claude Code

在你的项目中或所有项目的 ~/.claude.json 中添加至 .mcp.json:

{
  "mcpServers": {
    "deepseek-subagent": {
      "command": "uvx",
      "args": [
        "--from", "git+https://github.com/gaztrabisme/deepseek-subagent-mcp",
        "deepseek-subagent-mcp"
      ],
      "env": {
        "DEEPSEEK_API_KEY": "sk-...",
        "DSA_WORKSPACE": "/path/to/your/project"
      }
    }
  }
}

Codex

添加至 ~/.codex/config.toml:

[mcp_servers.deepseek-subagent]
command = "uvx"
args = ["--from", "git+https://github.com/gaztrabisme/deepseek-subagent-mcp", "deepseek-subagent-mcp"]
env = { DEEPSEEK_API_KEY = "sk-...", DSA_WORKSPACE = "/path/to/your/project" }

工具

工具

功能

dsh_delegate

启动一个针对任务的新子代理。立即返回 agent_id 和 run_id。

dsh_await

阻塞直到运行完成;返回结果。

dsh_continue

在原始会话中向现有代理发送后续工作。

dsh_list

此服务器拥有的所有代理,包括状态、成本和运行历史。

dsh_cancel

停止代理并释放其进程。

dsh_transcript

代理实际做了什么——工具调用、消息、回合结束以及原始响应。

默认情况下运行是异步的,因为编码任务可能需要数分钟,而 MCP 客户端会对单个工具调用设置超时。dsh_delegate 在工作排队后立即返回;dsh_await 执行等待并在等待时报告进度。对于短任务,可以向 dsh_delegate 传递 wait_seconds 并跳过第二次调用。

每个 dsh_delegate 创建一个代理,持有一个运行时进程和一个持久化会话。dsh_continue 重新进入该会话,因此子代理仍会在其上下文中保留之前的回合。

每次委托都说明将如何被验证

dsh_delegate 需要 verification 参数:证明任务完成的命令。

dsh_delegate(task="Fix the failing date parser", verification="pytest -q tests/test_dates.py")

服务器在代理的工作区中自行运行该命令,在子代理完成后。子代理报告自己的测试结果是一种声称;退出码是一个事实,而代理过早宣布胜利是一个有充分记录的失败模式。

结果

状态

命令退出码为 0

completed

命令失败、超时或从未给出

completed_unverified,附带输出

该命令由与限制子代理自身调用相同的策略进行分类——调用者是另一个代理,可能受到提示注入,因此“调用者要求这样做”并不构成授权。当确实没有需要检查的内容时,传递 verification="true";明确的谎言优于沉默的默认值。

返回的内容

返回完整对话记录的子代理违背了其自身目的。当子代理的回答大于 DSA_SUMMARY_TOKENS 时,会在同一会话中再增加一个回合,要求其用包含七个部分(目标、约束与偏好、进展、关键决策、下一步、相关文件、关键上下文)的交接摘要替换它。这就是跨过 MCP 边界的内容。

已经低于限制的回答会原样返回,不消耗额外回合。原始响应始终保留:dsh_transcript(run_id, raw=True)。

受监督的执行

子代理的工具调用在运行前会受到限制。运行时内部的 PreToolUse 钩子将每个提议的调用传递给此服务器,服务器回答允许或拒绝;被拒绝的调用会作为带有原因的阻塞工具结果返回给模型,模型会进行调整。

确定性分类器首先做出决定,且大部分调用由它决定。读取文件、ls、grep、版本控制读取、运行工作区自身的代码和测试等操作可以在没有模型参与的情况下允许。特权命令、工作区外的删除、将 fetch 管道输入到 shell 以及任何涉及 SSH 密钥或 .env 的操作都会被直接拒绝——即使是通过看似无害的动词,因为 cat ~/.ssh/id_rsa 是一个应用于秘密的只读工具。只有分类器无法分类的情况才会升级。

升级在客户端支持的最佳层级上运行,在启动时解析并由 dsh_list 报告:

层级

谁决定

要求

agent

你配置的审查进程

DSA_SUPERVISOR=agent

sampling

MCP 客户端的模型

客户端声明支持 sampling

elicitation

你在你的客户端中决定

客户端声明支持 elicitation

deterministic

无人——升级被拒绝

始终可用

无人值守运行。 Claude Code 声明支持 elicitation 而非 sampling,因此默认情况下每次升级都会打扰一个人——这对于一个旨在你处理其他事情时自行工作的代理来说是不合适的。DSA_SUPERVISOR=agent 将本地审查者置于该位置:

DSA_SUPERVISOR=agent                        # nothing prompts a human
DSA_SUPERVISOR_CMD="claude -p --model sonnet"   # any CLI reading a prompt on stdin

审查者收到相同的结构化事实,并在第一行回答 ALLOW 或 DENY。其他任何内容均视为 DENY。这会消耗一个子进程和大约每次升级八秒,并消耗该 CLI 登录账户的 token。

审查者是判断,而非边界。 给定 cp note.txt $TMPDIR/copy.txt,如果事实正确报告目标位置不可解析,一个 Claude 审查者推理认为 $TMPDIR“与工作区所在的 OS 临时根目录相同”并允许了它。写入操作落在了工作区之外。这类调用现在在审查者看到之前就被规则拒绝——这是正确的分工:规则守住边界,审查者处理边界内的灰色区域。

每个层级都在失败时关闭。不可达的监督者、超时、格式错误的请求或不支持这两种能力的客户端都会产生拒绝,永远不会产生批准。

层级是逐步遍历的,而不是一次性选择:一个层级如果出错会回退到下一个,因此一个丢弃了 sampling(在 2026-07-28 规范修订版中已弃用,但今天仍可工作)的客户端会降级为询问你,而不是拒绝所有内容。一个层级如果超时则不会回退;未回答的问题就是拒绝,而在另一个通道上重新询问只会使等待时间加倍。

设置 DSA_SUPERVISOR=off 可以完全关闭限制。

展示给监督者的是结构化事实,而非子代理的散文:工具、每个管道段中的程序,以及命令命名的每个路径及其是否在工作区内的标记。子代理编写命令及其任何理由,而能够为自己辩护的子代理将会这样做。无法静态解析的路径——如 $TMPDIR/out.txt——会被报告为未解析,并视为工作区外。

examples/claude_supervisor.py 针对真实的 Claude 运行整个模式,适用于那些自身不声明 sampling 的客户端:

DEEPSEEK_API_KEY=sk-... uv run python examples/claude_supervisor.py

上限与成本

被委托的代理在循环中消耗你的资金,因此四个独立的上限约束它,每次运行都会报告其使用情况。

上限

参数

强制执行方式

每次运行的挂钟时间

DSA_RUN_TIMEOUT

杀死运行时

每次运行的总 token

DSA_TURN_TOKEN_BUDGET

杀死运行时

每次运行的模型调用次数

DSA_MAX_STEPS

杀死运行时

相同重复的工具调用

DSA_LOOP_STRIKES

杀死运行时

线上没有中间回合的中止机制,因此每次停止都是进程杀死。因上限而杀死的操作总是优先于运行自身报告的结果:被杀死进程的输出永远不会被解读为成功。

dsh_delegate、dsh_await 和 dsh_list 都会报告 token 使用量——输入、输出、缓存读取和写入以及步数——从提供商报告的数据中汇总。每步的输入被有意求和:每次请求都会对完整重发的前缀计费,因此总和就是委托实际花费的代价。

跟踪记录及其用途

每次委托都会留下两条记录。

子代理的运行时写入自己的持久日志——每个带有参数的工具调用、每个带有退出码、持续时间和裁决文本的钩子调用、每步 token 使用量——位于 <session root>/<workspace>/<session>/session.jsonl.zstd。

此服务器将自己的日志追加到 <session root>/trace.jsonl:每个裁决及其层级、延迟以及展示给监督者的事实,每个完成的运行及其验证结果和使用情况,以及每次精炼回合实际产生的字符/ token 比率。长度,而非文本——跟踪记录用于测量,而非保留源代码的副本。设置 DSA_TRACE 可移动其位置,或设置 DSA_TRACE=off 禁用它。

uv run python scripts/trace_report.py            # reads .dsh-sessions/trace.jsonl

该报告回答了默认值所猜测的问题:分类器升级的频率及对象,DSA_CHARS_PER_TOKEN 是否与观察相符,以及 DSA_MAX_STEPS 和 DSA_TURN_TOKEN_BUDGET 相对于实际使用的位置。在此项目上的首次运行发现 pwd && ls 被升级到模型——花费了十一秒和一次模型调用,只为了被告知只读列表已经知道的内容——现在通过策略在三分之一毫秒内解决。

配置

每个设置都是服务器进程上的环境变量。

变量

默认值

含义

DEEPSEEK_API_KEY

—

必需。传递给子运行时。

DEEPSEEK_BASE_URL

DeepSeek 的公开 API

指向代理或自托管端点。

DSA_MODEL

deepseek-v4-pro

用于委派工作的模型 ID。deepseek-v4-flash 更便宜。

DSA_WORKSPACE

服务器的工作目录

子进程读取和写入的目录。

DSA_MAX_AGENTS

4

允许同时存在的活动智能体数量。每个智能体持有一个进程。

DSA_SESSION_ROOT

<workspace>/.dsh-sessions

会话日志写入的位置。

DSA_MAX_TOKENS

提供商的默认值

子进程每个请求的输出上限。

DSA_TURN_TOKEN_BUDGET

未设置

单次运行在终止前可消耗的总 token 数。

DSA_MAX_STEPS

40

单次运行在终止前可进行的模型调用次数。

DSA_LOOP_STRIKES

3

在运行被判定为失控而终止前,连续相同的工具调用次数。

DSA_RUN_TIMEOUT

1800

运行被终止并报告失败前的秒数。

DSA_IDLE_TIMEOUT

900

空闲智能体被回收并驱逐前的秒数。

DSA_RUN_ARCHIVE

200

已完成的运行在智能体被回收后仍可读取的数量。

DSA_SUMMARY_TOKENS

2000

当结果大小超过此值时,子进程会被要求进行提炼。

DSA_CHARS_PER_TOKEN

3.5

用于该上限的转换系数。在此工作负载下实测为 3.54。

DSA_VERIFY_TIMEOUT

300

验证命令可运行的秒数,受运行剩余截止时间的限制。

DSA_SUPERVISOR

auto

auto / agent / sampling / elicitation / allow-escalations / off。

DSA_SUPERVISOR_CMD

claude -p --model sonnet

DSA_SUPERVISOR=agent 时的审核器。从 stdin 读取提示。

DSA_SUPERVISOR_TIMEOUT

120

等待裁决结果后拒绝的秒数。

DSA_SANDBOX_MODE

workspace-write

read-only、workspace-write 或 danger-full-access。

DSA_REASONING_EFFORT

low

off / low / high / max。对成本影响较大。

DSA_CONTEXT_WINDOW

200000

工作预算压缩的度量基准。

DSA_BASH_TIMEOUT_MS

60000

单次 bash 调用的执行器级别限制。

DSA_REQUEST_TIMEOUT

无

等待单次运行时请求的秒数。

DSA_TRANSCRIPT_LIMIT

400

每次运行保留的活动行数。

DSA_LOG_LEVEL

info

服务器日志级别。仅写入 stderr。

DSA_TRACE

<session root>/trace.jsonl

决策与运行追踪。设为 off 可禁用。

DSA_CORDIS

打包的编排文件

路径,或使用 bundled 表示上游的最小配置。

DSA_PROVIDER

deepseek-official

由编排文件注册的提供商路由。

在依赖此工具前应了解的局限性

这些限制来自 Harness SDK 的线路协议,而非本项目的选择。

  • 文件系统沙箱不覆盖 bash。 dsh-fs-sandbox 将模型的 write/edit 工具限制在工作区内,但 dsh-bash-sandbox 并未包含在打包的运行时可执行文件中,因此 bash 本身不受限制。监管器弥补了这一点——它会在执行前对包括 bash 在内的所有工具进行把关。如果设置 DSA_SUPERVISOR=off,则 bash 完全没有边界限制;请将其指向一个分支或暂存目录。

  • 沙箱仅限制文件操作——不限制网络、进程或系统调用。另外,workspace-write 除了工作区根目录外还允许 /tmp。

  • 取消操作会杀死进程。 线路协议中不提供中途取消能力,因此 dsh_cancel 直接终止运行时。已写入磁盘的编辑内容会保留,但会话此后无法恢复。

  • 被回收的智能体会话会消失,但其结果不会。 超过 DSA_IDLE_TIMEOUT 后进程被释放;dsh_await 和 dsh_transcript 在其已完成的运行上仍可工作,但 dsh_continue 不行。

  • 会话的寿命等同于进程的寿命。 没有每会话的关闭机制,因此内存会随智能体的历史记录增长。请取消不再需要的智能体。

  • 上游处于开发者预览阶段。 deepseek-harness-sdk 固定为 ==0.1.0rc7;一周内发布了两个候选版本。预期线路协议会发生变化。

开发

uv sync
uv run pytest                  # 153 tests, no API key, no network
uv run ruff check .
uv run deepseek-subagent-mcp   # starts on stdio; a client drives it

实时测试需要真实密钥并消耗 token;它们不会被 pytest 收集:

DEEPSEEK_API_KEY=sk-... uv run python tests/smoke_task.py        # the product works
DEEPSEEK_API_KEY=sk-... uv run python tests/smoke_result.py      # distillation and the archive
DEEPSEEK_API_KEY=sk-... uv run python tests/smoke_supervisor.py  # the gate works
DEEPSEEK_API_KEY=sk-... uv run python tests/smoke_escalation.py  # both escalation tiers
DEEPSEEK_API_KEY=sk-... uv run python tests/smoke_limits.py      # reaper and deadline
DEEPSEEK_API_KEY=sk-... uv run python tests/smoke_mcp.py         # all six tools

CLAUDE.md 包含架构和上游约束;wiki/ 包含决策记录和测量结果。

许可证

MIT

Available Tools

6 tools
dsh_awaitA

Wait for a run to finish and return its result.

Safe to call repeatedly. If the run is still going when wait_seconds elapses, this returns the current state rather than an error. Runs whose agent has since been reaped are still readable — their results are archived.

Args: run_id: The run to wait on, from dsh_delegate or dsh_continue. wait_seconds: Maximum time to block. Use a longer value for big tasks.

ParametersJSON Schema
NameRequiredDescriptionDefault
run_idYes
wait_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations present, the description carries the transparency burden and does well by disclosing that repeated calls are safe, that timeout returns current state rather than error, and that archived results from reaped agents remain readable. These are non-obvious runtime behaviors that help the agent decide when and how to call the tool.

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?

The description is tightly structured: one purpose sentence, then behavioral notes, then parameter explanations. Every sentence adds meaningful information without repetition or fluff. The format uses clear separation and remains easy to scan.

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?

The description covers the most important contextual aspects: repeatability, timeout behavior, run provenance, and archived result accessibility. Since an output schema is present, the description does not need to explain return values in depth. Minor gaps like error cases for unknown run_id are not critical for this tool.

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 description coverage is 0%, so the description is the only source of parameter meaning. It adds useful semantics: run_id is tied to dsh_delegate/dsh_continue, and wait_seconds is 'Maximum time to block' with tuning guidance for large tasks. This largely compensates for the missing schema descriptions.

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 clear, specific action: 'Wait for a run to finish and return its result.' It identifies the tool's resource (a delegated/continued run) and distinguishes it from siblings like dsh_list, dsh_cancel, and dsh_transcript by directly stating what this wait operation does.

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?

The description provides clear context for when to use this tool, such as waiting on a run identified from dsh_delegate or dsh_continue, and gives practical guidance to use a longer wait_seconds for big tasks. It does not explicitly mention exclusions or alternatives, but the usage context is unambiguous.

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

dsh_cancelA

Stop a subagent and release its runtime process.

The harness protocol has no mid-turn cancel, so this kills the child process. Any in-flight run is reported as cancelled, and file edits it already made stay on disk. Cancelling ends the session: its context cannot be resumed, so start a new agent rather than continuing this one.

Args: agent_id: Agent to stop.

ParametersJSON Schema
NameRequiredDescriptionDefault
agent_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it excels. It discloses the side effects: 'kills the child process,' 'in-flight run is reported as cancelled,' 'file edits it already made stay on disk,' and the session becomes non-resumable. This level of detail about runtime and session consequences is exemplary.

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?

The description is compact and well-organized, leading with the core action, followed by necessary behavioral caveats. Every sentence contributes meaningful information without redundancy. The Args section is minimal and to the point.

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 tool with a single parameter, no nested objects, and an existing output schema, the description covers all essential aspects: what it does, side effects, and parameter purpose. It could optionally mention expected return behavior or error handling, but those are likely captured by the output schema and are not critical for this simple cancellation operation.

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?

The schema provides zero description for 'agent_id' (coverage 0%), so the description must compensate. It does offer 'agent_id: Agent to stop,' which accurately identifies the parameter's purpose. However, it adds minimal detail beyond the parameter name and does not mention expected format, validation rules, or how to obtain a valid agent_id. It is functional but not enriching.

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 uses a specific verb and resource: 'Stop a subagent and release its runtime process.' It clearly differentiates from sibling tools like dsh_list, dsh_await, or dsh_continue by focusing on termination and process cleanup. The scope is unmistakable.

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?

The description explains the critical usage constraint: 'The harness protocol has no mid-turn cancel, so this kills the child process' and warns that 'Cancelling ends the session: its context cannot be resumed.' This provides clear context for when to use the tool, though it does not explicitly name alternative tools or state when not to use it beyond the session-ending implication.

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

dsh_continueA

Send follow-up work to an existing subagent, in its original session.

The child keeps the full context of its earlier turns, so refer to prior work directly ("the migration you just wrote"). Work is queued: if the agent is mid-run, this message runs after it.

Args: agent_id: Agent to continue, from dsh_delegate or dsh_list. message: The follow-up instruction. verification: Command proving this follow-up is done. Omit to skip verification for this turn; the run then reports completed_unverified. wait_seconds: Block up to this long for the run to finish. 0 returns at once.

ParametersJSON Schema
NameRequiredDescriptionDefault
messageYes
agent_idYes
verificationNo
wait_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations provided, the description must carry the burden of behavioral disclosure. It explains queuing behavior, the preservation of context, the optional verification parameter with its consequence (completed_unverified), and the wait_seconds blocking behavior. This adequately covers the tool's operational nuances, though it does not mention potential error conditions or authorization requirements, which are not critical for a follow-up tool.

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?

The description is efficient and well-structured. It opens with a one-sentence purpose, follows with a brief contextual note about queuing and context preservation, and then presents a clean, labeled Args list. Every sentence adds value; there is no fluff or repetition. The front-loaded purpose ensures agents quickly identify applicability.

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?

Given the tool's moderate complexity (4 parameters, optional verification, wait semantics), the description is complete. It covers the intended use case, operational behavior, and parameter meanings. Since an output schema exists, the description does not need to explain return values. It also implicitly addresses prerequisites by referencing dsh_delegate/dsh_list for obtaining agent IDs.

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

Parameters5/5

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

Despite a schema description coverage of 0% (i.e., the schema provides no textual descriptions), the description includes an 'Args' section that explains each of the four parameters: agent_id (identifies the target agent), message (the follow-up instruction), verification (optional command to prove completion), and wait_seconds (blocking duration). This adds rich meaning beyond the schema's bare types and defaults, fully compensating for the schema's lack of documentation.

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 begins with a clear, specific verb-resource combination: 'Send follow-up work to an existing subagent, in its original session.' This explicitly distinguishes it from sibling tools like dsh_delegate (which presumably creates a new agent) and dsh_await (which waits on runs). The phrasing is precise and immediately conveys the tool's core function.

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?

The description provides clear usage context by explaining that work is queued if the agent is mid-run and that the agent retains full context, enabling direct references to prior work. It also directs users to obtain agent IDs from dsh_delegate or dsh_list, indicating alternatives. However, it does not explicitly state when not to use this tool, such as when a fresh context is needed, so it stops short of full exclusion guidance.

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

dsh_delegateA

Start a new DeepSeek Harness subagent on a task.

Returns immediately with an agent_id and run_id unless wait_seconds is set. Each call creates a fresh agent with its own runtime process and session; use dsh_continue to give more work to an agent that already exists.

Args: task: What to do, with a clear definition of done. The child cannot ask you clarifying questions, so state the acceptance criteria. verification: The shell command that proves the task is done, run by this server in the workspace after the child finishes — e.g. "pytest -q" or "npm test && npm run lint". Its exit code decides whether the run is reported completed or completed_unverified. Pass "true" if there is genuinely nothing to check. workspace: Directory the child reads and writes. Relative paths resolve against the server's configured workspace. Defaults to that workspace. instructions: Optional standing guidance prepended to the task, e.g. coding conventions or files to leave alone. model: DeepSeek model id. Defaults to the server's configured model. name: Human label for this agent, shown in dsh_list. wait_seconds: Block up to this long for the run to finish. 0 returns at once.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNo
taskYes
modelNo
workspaceNo
instructionsNo
verificationYes
wait_secondsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A5/5.0
Behavior5/5

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

No annotations are provided, so the description fully discloses behavior: creates a fresh agent per call, returns immediately unless wait_seconds, child cannot ask clarifying questions (must include acceptance criteria), verification exit code decides unverified vs completed, workspace resolution, and defaults. This is thorough behavioral disclosure.

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?

The description is well-structured: a lead paragraph stating purpose and key behavior (fresh process, immediate return), then a clean Args section with one line per parameter. Each sentence adds value; no fluff. Front-loads the most important behavioral facts.

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?

The description covers every parameter with meaning, explains control flow (wait_seconds), explains the verification command's role in determining completion status, and mentions the sibling tool dsh_continue. It is complete enough for an agent to correctly invoke this tool without further context.

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

Parameters5/5

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

Schema has no descriptions (0% coverage). The description compensates fully: it explains task (with acceptance criteria and inability to clarify), verification (shell command, exit code semantics), workspace (relative paths, default), instructions (prepended standing guidance), model (default), name (human label), and wait_seconds (blocking behavior). Every parameter is given meaningful semantics beyond the schema's type-only definition.

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 clearly states the verb (start) and resource (a new DeepSeek Harness subagent), explains the immediate-return behavior, and explicitly distinguishes this from 'dsh_continue' for giving more work to existing agents. This effectively differentiates it from 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?

The description provides explicit guidance: states when to use dsh_continue for existing agents, explains the wait_seconds behavior, and describes the verification command's role in determining run status. This clearly orients the agent on when to invoke this vs. alternatives.

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

dsh_listA

List every subagent this server owns, with its state, cost, and run history.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

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

No annotations are provided, and the description does not explicitly state whether the operation is read-only, what side effects it might have, or any access requirements. It only lists what it returns.

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?

The description is a single, clear sentence that efficiently conveys the tool's purpose and output without any fluff.

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?

The description mentions the output attributes (state, cost, run history) and scope ('this server owns'), but does not discuss pagination, ordering, or other response details. Given an output schema is present, this is adequate.

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?

The tool has no parameters, and the description correctly omits any parameter details. With zero parameters, this is a baseline score of 4.

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 clearly states the action (List) and the resource (subagents) with specific attributes (state, cost, run history), making it distinct from sibling tools.

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

Usage Guidelines3/5

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

It is implied that this tool is for listing subagents, but there is no explicit guidance on when to use it versus alternatives like dsh_transcript or others.

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

dsh_transcriptA

Show what a subagent actually did during a run.

Returns the tail of its activity log — tool calls, assistant messages, turn endings. Use this to check progress on a long run, or to understand a failure. Returns live data while the run is still going.

Args: run_id: The run to inspect. limit: How many of the most recent activity lines to return. raw: Also return the child's full uncapped response. dsh_delegate returns a distilled version when the answer is large; this is where the original text lives.

ParametersJSON Schema
NameRequiredDescriptionDefault
rawNo
limitNo
run_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

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

Without annotations, the description carries the transparency burden. It explains that it returns the tail of the activity log, live data, and the effect of the 'raw' parameter. It implies read-only behavior by saying 'Show' and 'Returns', but doesn't explicitly state it has no side effects. This is adequate given the tool's nature.

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?

The description is well-structured with a clear overview and parameter explanations. It is slightly verbose but each sentence adds value. It is not overly long relative to the complexity of the tool.

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?

The description covers the tool's purpose, typical use cases, return behavior, and parameter semantics. It doesn't explain output schema (not required), but it provides enough context for an agent to decide when and how to use it. The mention of dsh_delegate relationship adds completeness.

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?

The description explains each parameter beyond the schema: run_id (which run), limit (how many recent lines), and raw (full uncapped response). It also connects raw to dsh_delegate, adding context. Since schema coverage is 100%, the baseline is 3, but the extra semantic detail raises it to 4.

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 clearly states the tool's function: 'Show what a subagent did during a run.' It specifies the content returned (tool calls, assistant messages, turn endings) and distinguishes it as a transcript tool for inspecting activity.

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?

The description provides clear usage scenarios: 'Use this to check progress on a long run, or to understand a failure.' It also mentions live data during a run, but does not explicitly contrast with sibling tools like dsh_list or dsh_delegate, which would make the guidance stronger.

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

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.2.0
    • First observeddsh_await
    • First observeddsh_cancel
    • First observeddsh_continue
    • First observeddsh_delegate
    • First observeddsh_list
    • First observeddsh_transcript

TDQS

A4.4/5.0

Scored across 6 tools

Disambiguation5/5

Each tool targets a distinct lifecycle operation: list, delegate, await, continue, cancel, and transcript. There is no overlap in purpose, and the descriptions clearly delineate when to use each.

Naming Consistency4/5

All tools use the 'dsh_' prefix with clear verb names (list, delegate, await, continue, cancel, transcript). The pattern is consistent, though 'dsh_transcript' is a noun rather than a verb, which is a minor deviation.

Tool Count5/5

Six tools cover the full lifecycle of subagent management without redundancy. This is well-scoped for the server's purpose.

Completeness5/5

The surface covers the complete lifecycle: create (delegate), monitor (await, transcript), extend (continue), and terminate (cancel), plus listing. No obvious gaps exist for managing subagents.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers