REPOSITORY ANALYSIS

tool-prune

Calibrated tool selection and schema pruning for AI agents. Dual-engine: zero-dependency offline TurboQuant or TypeSafe System One (Jev). Prunes candidate MCP tools and schemas down to the relevant set before calling LLMs to eliminate hallucinations and save tokens.

E2 · source reviewedPublic material or source evidence was reviewed. A fixed-version source review requires checking a pinned revision; this is not a reproduction, performance endorsement, or safety guarantee.
Stars
6
Forks
0
License
MIT
Last commit
2026-09-21

What Jev does here

Jev makes atomic decisions on tool selection (`choice`) and whether user intent requires open-ended creative generation (`noul`), with calibrated probability distributions.

Adds structured choices or scores to the workflow; performance and cost benefits have not been independently verified.

The cited router.js was read to distinguish local TurboQuant fallback, shortlist filtering and handler dispatch. This site did not reproduce token-saving, latency or accuracy figures. Local similarity scores and hosted probabilities require separate evaluation.

What task does this project fit?

Reduce a large tool registry to likely relevant schemas before sending a prompt to a generative model.

Material analysed:

From input to action

  1. Choose a local TurboQuant or hosted TypeSafe selection engine.
  2. Rank registered tools and apply fixed or distribution-based top-K selection.
  3. Pass schemas onward, or dispatch only when a registered handler clears the configured threshold.

Implementation details that matter

No-key fallback changes the meaning of scores

router.js can use the local TurboQuant engine when no API key is available. Its similarity scores and hosted probabilities should not be pooled into a single calibration claim.

Inspect the supporting source ↗

Pruning and execution are different operations

filter returns a shortlist; dispatch separately checks confidence and a handler. The shortlist's token savings do not establish safe or correct direct execution.

Inspect the supporting source ↗

When to choose it

Use filter when prompt size is the problem and a later model still decides arguments. Use direct dispatch only for narrow, independently authorized handlers with rejection tests.

How to inspect it yourself

Inspect select, autoSelectCandidates and dispatch separately. Check the requires_generation response field for the chosen provider contract before relying on it as a gate.

Limits of this review

  • No latency, token-saving or accuracy benchmark was reproduced.
  • Pruning can remove the correct tool; a fallback and shortlist-recall evaluation are needed.
Primary material used in this analysis