Letter2025/dsh-tool-search ↗★ 3
dsh-tool-search
Tool search & slimming for DeepSeek Harness: Hermes-style progressive disclosure — search, describe, and call long-tail tools on demand while keeping core tools eager
AI Analysis
核心用途是优化工具加载,通过按需检索和动态注入长尾工具来节省上下文窗口。适合工具集庞大、需要精简核心工具上下文以提升模型响应效率的任务。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Letter2025/dsh-tool-searchREADME
Read the full README ↗Configuration
Static tuning lives in your profile cordis.patch.yml (restart to change):
- id: tool-search
config:
enabled: auto # auto | on | off
thresholdPct: 5 # listing budget as % of context window
listingMaxTokens: 4000
configScope: auto # user | project | auto (project file wins when present)
core: [todo_write] # extra always-eager tools
maxWarmTools: 8 # LRU cap for dynamically injected tools
Tool groups, the matcher, and preload live in the runtime file (~/.dsh/dsh-tool-search.json for user scope):
{
"version": 1,
"scope": "user",
"groups": [
{ "name": "git", "tools": ["git_status", "git_diff"] },
{ "name": "mcp-github", "prefixes": ["mcp_github_"] }
],
"matcher": {
"endpoint": "https://dashscope.aliyuncs.com/compatible-mode/v1/rerank",
"apiKey": "sk-...",
"model": "qwen3-reranker",
"topN": 20
},
"preload": { "enabled": false, "topK": 5 },
"core": ["read_file", "write_file"]
}
groups: exact tool names and/or name prefixes; a tool belongs to the first matching group.matcher: an OpenAI-compatible/v1/rerankendpoint — the only matcher type.tool_searchreturns setup guidance until one is configured.preload: optional; when enabled (with a matcher), the session's first turn semantically preloads the top-K matching tools into the eager set.- The file is watched by mtime and hot-reloads; changes take effect on the next turn.