The Whole Shelf, Every Turn

A default DSH profile ships every mounted tool schema in the prefill before the model emits a single word — and charges that cost again on every turn. A fresh session pays 6,559 tokens and 26 tool schemas just to say hello.

DSH Tool Router replaces that shelf with a single small find_tool schema. Measured on the same session: 283 tokens, 1 schema. On a 32k context window that is roughly 20% of the model's world handed back for actual work.

Prefill cost comparison

Three Stages, One Schema

Stage 0 — Lexical rank. The router shortlists the mounted tools locally with stopword-filtered keyword and prefix matching. No model call, no latency.

Stage 1 — Decision model API. One compact POST /v1/systemone carries every mounted tool (up to 24) with a short criterion and returns the best tool plus a confidence score. Any server that speaks the protocol will do; the endpoint is configurable.

Stage 2 — Reveal. If confidence is at least 0.70, exactly one tool schema is injected and the rest stay masked. Otherwise the router returns a probability-ordered shortlist whose reason names the closest match — and an empty request always returns the full tool catalog as a hint. Exact tool names skip the decision call entirely.

Three stage routing flow

Small Shelf, Sharp Choices

  • 96% smaller prefill — 6,559 to 283 tokens measured on the same fresh session; the unused half of the shelf is never sent.
  • One schema at a time — small models follow one schema instead of 26 instructions they must never violate.
  • Your decision model, your endpoint — plain HTTP, no vendor lock-in; edit ROUTER_BASE in index.js to point anywhere.
  • Refuses weak guesses — the 0.70 confidence gate returns a ranked shortlist with a closest-match reason instead of revealing the wrong tool.
  • Recovery built in — exact-name fast path, case-insensitive matching, and an empty-request catalog hint for small models.
  • Self-healing masks — tools registered late are denied immediately; no schema leaks and no runaway re-arming.
Key features

Install In Minutes

  1. Check the prerequisites. DSH 0.2.0-rc.2 or newer, pnpm on PATH, and a running decision model API that speaks POST /v1/systemone (defaults to http://127.0.0.1:8081/v1/systemone).
  2. Add the plugin. From the Plugins page, enter the spec below — or use the CLI, or the prebuilt release tarball.
  3. Select the bundle. Pick the No Prefill bundle on the Plugins page (installation enables it by default) and restart DSH if the profile runs without HMR.
  4. Verify the boot log. You should see [dsh-tool-router] registered find_tool with the label count of your registry.
# Install from GitHub
dsh plugin --profile <profile> add \
    git+https://github.com/residenthiago2011/DSH-Tool-Router.git

# ...or from the prebuilt tarball
dsh plugin --profile <profile> add /path/to/dsh-tool-router.tgz
Install terminal

Pay For What You Use

A turn that calls no tool costs 283 tokens instead of 6,559. A turn that calls one tool reveals that one schema once — the other 24 are never sent.