Private
Public Access
fix(mcp_server): migrate from MCP_TOOL_SPECS dict to mcp_tool_specs.get_tool_schemas()
Phase 1 of code_path_audit_phase_2_20260624 deleted mcp_client.MCP_TOOL_SPECS (the 778-line dict literal). This broke scripts/mcp_server.py which iterated over mcp_client.MCP_TOOL_SPECS in its list_tools() handler — the MCP server crashed on startup with AttributeError, breaking the entire manual-slop MCP. Fix: use mcp_tool_specs.get_tool_schemas() (the new ToolSpec registry) and convert via .to_dict() to the JSON-compatible dict format the MCP Tool constructor expects. Verified: 46 tools listed (45 from registry + run_powershell); tool call (get_file_summary) dispatched end-to-end correctly; 23 mcp-related unit tests pass.
This commit is contained in:
@@ -19,6 +19,7 @@ sys.path.insert(0, project_root)
|
||||
sys.path.insert(0, os.path.join(project_root, "src"))
|
||||
|
||||
import mcp_client
|
||||
import mcp_tool_specs
|
||||
import shell_runner
|
||||
|
||||
from mcp.server import Server
|
||||
@@ -51,7 +52,7 @@ server = Server("manual-slop-tools")
|
||||
@server.list_tools()
|
||||
async def list_tools() -> list[Tool]:
|
||||
tools = []
|
||||
for spec in mcp_client.MCP_TOOL_SPECS:
|
||||
for spec in [t.to_dict() for t in mcp_tool_specs.get_tool_schemas()]:
|
||||
tools.append(Tool(
|
||||
name=spec["name"],
|
||||
description=spec["description"],
|
||||
|
||||
Reference in New Issue
Block a user