Skip to main content

Module tool_defs

Module tool_defs 

Source

Constants§

CORE_TOOL_NAMES
DESTRUCTIVE_TOOL_NAMES
Tools that may destructively modify their environment.
READONLY_TOOL_NAMES
Tools that never mutate their environment (files, indexes, session state). MCP clients (Cursor, Claude Desktop) may use readOnlyHint to allow these tools in restricted/readonly subagent contexts.

Functions§

apply_tool_annotations
Apply MCP ToolAnnotations (readOnlyHint, destructiveHint) to a set of tool definitions. Called by the registry before serving tools/list.
core_tool_names
discover_tools
granular_tool_defs
Full tool definitions for the MCP tools/list fallback and the lazy core set.
is_full_mode
lazy_tool_defs
normalize_for_strict_validators
Make a tool input schema acceptable to strict JSON-Schema validators.
tool_def
unified_tool_defs
Consolidated tool surface for LEAN_CTX_UNIFIED clients: the four native replacements plus a single ctx meta-tool that fans out to every sub-tool via an action argument. This is an intentionally distinct surface (the ctx meta-tool does not exist as a standalone registry entry), so it is maintained here rather than derived from the registry.