npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@little_monkey/dsh-preset-tool-gate

v0.3.0

Published

Hides host-registered tools from agents whose preset declares only its own tools.

Readme

@little_monkey/dsh-preset-tool-gate

Hides Host-registered tools from agents whose agent preset declares only its own tools.

Why

Tools registered on the Host context (MCP clients, host tool rows, experimental bundles) live in the global tool layer, and every Agent inherits them no matter which preset it mounted. A preset can only drop the tools its own plugin list fails to declare. The shipped minimal preset, for example, declares a fixed persona, read_image and a persistent shell, yet its first model request carried 71 tools — roughly 66 KB of JSON schema per request — because every host-registered tool was still visible.

What it does

The plugin is mounted on the Host plane. For every live Agent it reads the Agent's own live preset (agentPresets.presetForSession, falling back to the session header):

  • preset in isolatedPresets: it reads the names currently registered in the global tool layer and applies agent.ctx.tools.restrict({ deny }) over them;
  • any other preset: it lifts the mask.

Preset-owned tools are registered in the Agent's parent (preset) scope, not in the global layer, so they never appear in the deny list and stay visible. The plugin deliberately does not use allow: [], which would mask preset tools too.

Masks are re-aligned on agent/created, agent/disposed, agent-preset/selected, tools/change, and immediately before each step's tool-schema assembly, so preset switches, new MCP tools, restored sessions, and subagents spawned with an explicit preset are all covered.

Configuration

Open this bundle's page in the Plugins view. isolatedPresets is a checkbox list of the live preset roster; keepGlobal is a grouped checkbox list of global tool names. A name already saved but missing from the built-in list still appears, checked, under "Other tools already configured". Saving is one volatile mutation and applies from the next step.

- id: preset-tool-gate
  name: '@little_monkey/dsh-preset-tool-gate'
  config:
    isolatedPresets:
      - minimal
    keepGlobal: []

| Field | Default | Meaning | |---|---|---| | isolatedPresets | [] | Agent preset ids whose Agents see only the tools their preset declares. Applies to subagents too: a standard parent that spawns a child with agentPreset: minimal gets an isolated child. | | keepGlobal | [] | Global tool names that stay visible inside isolated presets, for example working_directory. Names that are not currently registered are ignored. |

Limits

  • It hides tool schemas and blocks the hidden tools from execution; it does not change sandbox, approval, or permission policy.
  • A tool registered after the last reconcile is hidden by the next step's alignment; the reverse (a tool becoming hidden between two steps) takes effect immediately.
  • Only presets whose tools are declared in a preset scope benefit; a deployment without the agent-preset roster is unaffected.
  • fork subagents cannot select a preset, so only in-process spawn children can be minimal.

Verification

  1. Create or spawn an agent whose preset is in isolatedPresets.
  2. Inspect its first request/header tool list (or the session JSONL): it contains only the tools its preset declares.
  3. Confirm a non-isolated preset (for example standard) still sees the host tools.
  4. Switch an isolated session to another preset and back: the tool list grows and shrinks accordingly.