diff --git a/docs/guide_ai_client.md b/docs/guide_ai_client.md index a9e8a683..8993157d 100644 --- a/docs/guide_ai_client.md +++ b/docs/guide_ai_client.md @@ -425,7 +425,7 @@ Gated by env var (e.g., `RUN_REAL_AI_TESTS=1`). Hits the real API. Not in defaul - **[guide_architecture.md](guide_architecture.md#ai-client-multi-provider-architecture)** — Threading model and provider dispatch - **[guide_mma.md](guide_mma.md#tier-3-worker-lifecycle-run_worker_lifecycle)** — How Tier 3 workers use ai_client -- **[guide_mcp_client.md](guide_mcp_client.md)** — The 45 tools that ai_client can invoke +- **[guide_mcp_client.md](guide_mcp_client.md)** — The 46 tools that ai_client can invoke (canonical list in `models.AGENT_TOOL_NAMES`) - **[guide_rag.md](guide_rag.md)** — RAG engine integration via `rag_engine` parameter - **[guide_state_lifecycle.md](guide_state_lifecycle.md)** — The per-provider history globals (`_anthropic_history`, etc.) are managed here; their locking and reset behavior is documented - **[guide_context_aggregation.md](guide_context_aggregation.md)** — The `aggregate.py` pipeline that produces the markdown the AI client sends diff --git a/docs/guide_mcp_client.md b/docs/guide_mcp_client.md index dc8c1ead..54dd4a85 100644 --- a/docs/guide_mcp_client.md +++ b/docs/guide_mcp_client.md @@ -1,4 +1,4 @@ -# `src/mcp_client.py` — MCP Tools (45 tools, 3-layer security) +# `src/mcp_client.py` — MCP Tools (46 tools, 3-layer security) [Top](../Readme.md) | [Architecture](guide_architecture.md) | [Tools & IPC](guide_tools.md) | [Testing](guide_testing.md) @@ -6,7 +6,7 @@ ## Overview -`src/mcp_client.py` (~81KB) is the **MCP (Model Context Protocol) tool implementation** for Manual Slop. It provides 45 tools that the AI can invoke to read/write files, analyze code structure, search symbols, and more. +`src/mcp_client.py` (~81KB) is the **MCP (Model Context Protocol) tool implementation** for Manual Slop. It provides 46 tools that the AI can invoke to read/write files, analyze code structure, search symbols, and more. The canonical list lives in `models.AGENT_TOOL_NAMES` (`src/models.py:58`). The module implements the **client side** of MCP — it provides the tools that an AI model can call during a conversation. It also implements the project's strict filesystem security model. @@ -117,13 +117,12 @@ The tools are organized by category. The full registered count is 45. | `set_file_slice` | `path`, `start_line`, `end_line`, `new_content` | Replaces a line range with new content | | `edit_file` | `path`, `old_string`, `new_string`, `replace_all` | Exact string match replace. Preserves indentation. | -### Python AST Tools (15) +### Python AST Tools (18) | Tool | Parameters | Description | |---|---|---| | `py_get_skeleton` | `path` | Skeleton: signatures + docstrings, bodies replaced with `...` | | `py_get_code_outline` | `path` | Hierarchical outline: classes, functions, methods with line ranges | -| `py_get_symbol_info` | `path`, `name` | (source, line_number) for a class/function/method | | `py_get_definition` | `path`, `name` | Full source for a class/function/method | | `py_update_definition` | `path`, `name`, `new_content` | Surgical replacement (locates via ast, delegates to set_file_slice) | | `py_get_signature` | `path`, `name` | Just the `def` line through the colon | @@ -131,8 +130,15 @@ The tools are organized by category. The full registered count is 45. | `py_get_class_summary` | `path`, `name` | Class docstring + method signatures | | `py_get_var_declaration` | `path`, `name` | Module/class-level variable assignment line(s) | | `py_set_var_declaration` | `path`, `name`, `new_declaration` | Surgical variable replacement | -| `py_get_hierarchy` | `path`, `class_name` | Subclasses of a given class | | `py_get_docstring` | `path`, `name` | Docstring for module/class/function | +| `py_find_usages` | `path`, `name` | All references to a symbol in a file/dir | +| `py_get_imports` | `path` | AST-derived dependency list (modules, froms, names) | +| `py_check_syntax` | `path` | Quick syntax check via `ast.parse()` | +| `py_get_hierarchy` | `path`, `class_name` | Subclasses of a given class | +| `py_remove_def` | `path`, `name` | AST-derived line-range excision of a class/function | +| `py_add_def` | `path`, `name`, `new_content`, `anchor_type`, `anchor_symbol` | Inserts a new definition at a specific anchor | +| `py_move_def` | `src_path`, `dest_path`, `name`, `dest_name`, `anchor_type`, `anchor_symbol` | Relocates a definition within/across files | +| `py_region_wrap` | `path`, `start_line`, `end_line`, `region_name` | Wraps a block in `#region: Name` / `#endregion: Name` | | `py_get_imports` | `path` | AST-parsed dependency list | | `py_find_usages` | `path`, `name` | Exact string match search | | `py_check_syntax` | `path` | Syntax validation via `ast.parse()` |