# libtmux_mcp.middleware.ToolsetMiddleware

- **Module:** libtmux_mcp.middleware
- **Package:** libtmux-mcp
- **Language:** Python
- **Kind:** class
- **Source:** https://github.com/tmux-python/libtmux-mcp/blob/4daddc0dfca96c43bf521d818bf91564e1434760/src/libtmux_mcp/middleware.py#L89
- **Page:** https://libtmux.org/en/py/latest/mcp/reference/libtmux_mcp-middleware-toolsetmiddleware/

Filter tools to the enabled toolsets.

Filtering controls which MCP tool calls this server advertises and
accepts. It does not confine tmux: an enabled ``execute`` tool can type
the equivalent of any hidden tool.

## Members

- `__init__` (method)
- `on_list_tools` (method): Drop tools outside the enabled surface from the listing.
- `on_call_tool` (method): Refuse a tool outside the enabled surface.
