dsh-tools-toggle:在 Web Settings 一键开关 DSH 模型工具

Preface

DeepSeek Harness (DSH) attaches a fixed set of tools to agents: presets, and tools brought by plugins like bash, web_search, and web_fetch, all enter every request. The more tools there are, the more tokens they occupy in the prompt, and the easier it is for the model to invoke tools it may not actually need. If you only want to have an offline session, narrow down the task scope, or compare whether turning off a specific tool is better, in the past, you often had to manually edit the profile patch and restart.

Below is an introduction to the client-side plugin dsh-tools-toggle maintained by pinion05 (npm package name @npmc_5/dsh-tools-toggle, version 0.1.0, MIT license). It provides toggles for inherited tools in Settings → Tools of DSH Web; once turned off, the tools disappear from the model’s perspective as a whole—not only can they not be executed, but schema, description, and lookup will no longer appear, thereby saving relevant tokens.

What is this

dsh-tools-toggle is a plugin mounted on the DSH Web settings page, categorized as client-side (platform: web). The maintainer is pinion05. It solves the problem: maintaining a “disabled tools” list via UI without manually editing configuration files, and applying it through the dsh-tools restrict mechanism when creating a new agent.

Core Features

Tool Directory in Settings

The plugin adds a section to the native Settings → Tools, listing all inherited tools under the current profile (including preset-plane tools). Each line displays the name and a description, and provides a search box and a “Show only disabled” filter. The interface supports Korean and English locales.

Configuration Persistence

Toggling switches sends a POST request to the plugin host route. The settings service writes the deny list into the plugin loader configuration item and applies it to the user layer of the profile patch, persisting even after upgrades. Writing is serialized to avoid stacking rapid clicks on outdated configurations; reading waits for incomplete writes (read-your-writes).

Hiding Tools via Restrict

On the Host side, agent.ctx.tools.restrict({ deny }) is called once when creating an agent. Disabled tools simultaneously lose schema, lookup, and execution capabilities; the model side no longer “knows” the tool exists. If the model still guesses the tool name to invoke, it receives a clean UNKNOWN_TOOL rejection.

This timing is related to the prefix cache: restriction rewrites the tool array facing the model (part of the request prefix). If the deny list is changed in an ongoing session, it would break the provider’s prefix cache. Therefore, it is only applied when creating an agent; ongoing sessions deliberately do not change.

  • New sessions (including new subagents) adopt the current switch state.
  • Existing sessions retain their original toolface and cache until they naturally end.
  • When resuming a session with a new agent after a Host restart, the switch changes made before the restart are applied (accompanied by an inevitable re-prefill).

Design Aspects That Won’t Cause Collateral Damage

  • Internal mechanisms related to scope are not switchable by default (e.g., structured output pipelines delegated by subagents, reserved PTC run_code transmission), allowing multi-agent workflows to continue running.
  • The switch state is in the UI configuration; even if all are turned off, the Settings page remains usable and can be restored at any time.
  • A one-time confirmation dialog pops up when disabling bash, read, write, or edit.

Installation and Enablement

The plugin is pure ESM with no build steps; peer dependencies (cordis, dsh-tools, dsh-host-webserver, etc.) are resolved from the DSH install tree. engines.dsh requires >=0.2.0-rc.1 <0.3.0-0.

The installation steps given in the official README are as follows:

git clone https://github.com/pinion05/dsh-tools-toggle.git
dsh plugin --profile web add ./dsh-tools-toggle

After execution, refresh DSH Web and open Settings → Tools.

Typical Usage

  1. Complete the installation above and refresh the Web client.
  2. If the directory is empty, first start a session as prompted—the tool names come from a snapshot of the live agent; the page will prompt for a session before the first one.
  3. In Settings → Tools, search or filter tools and turn off items you don’t need; confirm when prompted for core read/write/terminal tools.
  4. After creating a new session (or a new subagent), disabled tools will no longer appear in the model’s requests; to restore them, reopen the switch and start a new session.

Note: Currently, there is a single profile-level deny list that does not support per-session overrides; re-enabling is a policy relaxation, done only via UI operations, not providing agent-side tools.

Use Cases and Notes

Who is it for: Developers who need to temporarily narrow the toolset without deleting plugins or manually editing patches; for offline or noise-reducing sessions; to compare whether a specific tool is worth keeping.

Limitations (as stated in README):

  • Only takes effect for new sessions; ongoing conversations will not change due to toggling—this is prefix-cache protection, not a bug.
  • The tool directory requires at least one session to be fully displayed.
  • No per-session overrides (may be extended in the future).

Security and Permissions: The plugin runs with the permissions of the current DSH process, and configuration is written to the local profile. Please read the GitHub repository source code and MIT license before installing to confirm it meets your environment requirements. The community directory skillhub.cn has no official affiliation with DeepSeek / Hypi; the DSH ecosystem follows the “everything is a plugin” philosophy, and this plugin is a community contribution, not an official app store entry.

Conclusion

dsh-tools-toggle turns “turning off certain inherited tools” into a one-click operation in Web Settings, and uses restrict at creation time to make the disabled results take effect on schema, lookup, and execution simultaneously. To try it out, you can get the repository from the community directory page or GitHub, install it into the web profile using the official command, manage the deny list in Settings → Tools, and verify the effect with a new session.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye