在 DeepSeek Harness (DSH) 的使用场景中,模型上下文占用随着工具列表的增多而增加。当工具过多时,模型可能忽略低频但重要的功能,或消耗不必要的 Token。DSH 工具管理插件通过开关和分组机制,按需加载工具,解决这一问题。

插件概览

该插件由 pan17 维护,采用 MIT 许可证。核心功能是按 Agent Preset 开关和分组工具,像 Skill 一样按需加载工具,减少模型上下文占用。插件管理的是模型能否看到和调用工具,不会停止 Cordis 插件或 MCP 服务进程。

安装与启用

…

In DeepSeek Harness (DSH) usage scenarios, model context usage increases as the tool list grows. When there are too many tools, the model may ignore low-frequency but important capabilities or consume unnecessary tokens. The DSH Tool Manager plugin resolves this issue by switching and grouping tools and loading them on demand.

Plugin Overview

This plugin is maintained by pan17 and is licensed under the MIT License. Its core function is to enable/disable and group tools by Agent Preset, loading tools on demand like a Skill to reduce model context usage. The plugin manages whether the model can see and call tools; it does not stop Cordis plugins or MCP service processes.

Installation and Activation

Requires DeepSeek Harness 0.2.0-rc.2 or later. This plugin is adapted and tested for that version’s Agent Preset and tool registry behavior; for earlier DSH versions, use 1.2.8.

Open Settings → Plugins → Add Plugin and enter the package name in the input box:

dsh-tool-manager

Click Install to proceed. After installation, open the WebUI:

http://127.0.0.1:3080

Go to Settings → Tool Management.

Method 2: Command Line

Desktop users:

dsh plugin --profile desktop add dsh-tool-manager

Non-desktop (web / tui / headless):

npx @deepseek-ai/dsh plugin --profile web add dsh-tool-manager

After installation, restart the corresponding DSH Profile.

Core Features and Usage

1. Select an Agent Preset

At the top of the Tool Management page in the WebUI, select the Agent Preset to configure. Tool policies for different Presets are independent.

2. Enable or Disable Tools

Check or uncheck tools in the tool directory:
* Checked: The tool remains available and appears in the model’s tool list.
* Unchecked: The tool is disabled, is not shown to the model, and cannot be called.

You can quickly locate tools using search and status filters.

3. Tool Grouping

Manual selection or automatically generated groups are supported. Related tools can be organized into the same group, such as “GitHub Tools” and “File Processing”.

Manual Grouping

Click “Manual Grouping”, fill in the group name and description, search for and check tools, and click “OK”.

Automatic Grouping

Click “Automatic Grouping”, then search for and check the tools that need to be organized. The plugin passes the selected ungrouped and enabled tools to the current default model to generate the group name and description. Before execution, you can preview and edit the prompt; the default timeout is 120s. After confirmation, the result is shown in a preview and is not immediately written to the configuration.

4. On-Demand Loading

Tools placed in on-demand groups do not all appear in the model context by default. Under normal conditions, the model only sees the group directory; when a task requires a group of capabilities, the model can call the tool_list tool to open the group.

Call example:

{
  "group": "GitHub 工具"
}

The original tools in that group are then opened in the current session. On-demand loading has the following characteristics:
* Tools are opened by group and do not need to be enabled one by one.
* Each on-demand group must contain at least one currently available and not disabled tool.
* A tool can belong to only one on-demand group.
* Once opened, a tool remains available for the current session; when DSH is restarted and the same session is restored, the open state is restored based on successful tool_list calls in that session.
* Tools explicitly disabled are not re-enabled by an on-demand group.

Notes

  • Version requirement: DSH >= 0.2.0-rc.2 is required; for older versions, continue using 1.2.8.
  • Process control: The plugin manages only model visibility of tools and does not stop the Cordis plugin or MCP service process that owns the tools.
  • Configuration files: Modifying the configuration does not overwrite DSH’s built-in Agent Preset files.
  • Session scope: On-demand opening applies only to the current Agent session; a new session or a child session forked from the current session still starts from the default hidden state.
  • Auto-generation cost: Automatic naming and automatic grouping call the current default model and generate one request; the default timeouts are 60 seconds and 120 seconds, respectively.

References