Skip to main content

Module tool

Module tool 

Source
Expand description

Declarative tool registry for per-backend MCP routers.

A backend declares its tools as a const slice of ToolSpec rows, each row carrying the gating flags for that tool. ToolRouterExt::from_specs folds the slice into a ToolRouter, skipping tools the current mode forbids. This keeps the read-only / pinned gating matrix as data, not control flow.

Structs§

ToolSpec
Declarative registration entry for one MCP tool.

Traits§

ToolRouterExt
Extends ToolRouter with declarative construction from a ToolSpec table.