Expand description
Tool categories, the public-surface name lists (local collaboration,
internal host hooks, Hive) and the dynamic per-category tool state.
Pure name logic: it needs no tool registry, so engine code outside the MCP
server reads it here. The call-resolving helpers (ctx_call spellings)
stay in server::dynamic_tools, which re-exports this module.
Re-exports§
pub use crate::core::hive_gate::HIVE_TOOLS;
Structs§
- Dynamic
Tool State - Removed
Tool - A tool that was removed: folded into a primary tool (#509) or retired
without a successor (focus release, 2026-10). Only the name survives, so a
call from an older agent prompt or config gets the way forward instead of
a bare “Unknown tool” (
docs/migration/focus-2026-10.md).
Enums§
Constants§
- INTERNAL_
HOST_ TOOLS - Host-integration hooks: called by a host extension (the Claude Code mod’s
$.mcp.call, through the listedctx_callsince hosts may refuse unlisted tools, #2089), never by an agent. Advertising them would only spend prompt tokens on a tool the model must not use. - LOCAL_
COLLABORATION_ COMPATIBILITY_ TOOLS - Local collaboration substrate that remains callable for installed users but is excluded from every public MCP tool surface.
Functions§
- categorize_
tool - global
- init_
all_ enabled - init_
from_ config - Initializes the global state from user config (env var > config.toml > default).
Call once during server startup after config is loaded.
If the global was already initialized (e.g. by a concurrent
global()call), applies the categories to the existing state instead. - is_
local_ collaboration_ compatibility_ tool - Whether a registered tool is retained only for local compatibility and must never be advertised from a public tool-definition path.
- is_
publicly_ advertised_ tool - Whether a registered tool belongs on a public MCP tool surface.
- is_
readonly_ tool - is_
withheld_ hive_ tool - Whether
nameis a Hive tool withheld by the release switch. - removed_
tool - The successor and migration hint for a removed tool name, else
None. - removed_
tool_ message - The error text for a call to a removed tool. Stable per name (no timestamps/counters) so provider-side prompt caching stays byte-stable (#498).