Skip to content

Commit c0562b5

Browse files
Brian KrafftCopilot
andcommitted
feat(4.7): extract MCPToolHandlers into openspace/mcp/tool_handlers.py
Extract all 4 MCP tool handlers (execute_task, search_skills, fix_skill, upload_skill) and their 12 helper functions from mcp_server.py into a new openspace/mcp/tool_handlers.py module. Changes: - Create openspace/mcp/ package with __init__.py - Create openspace/mcp/tool_handlers.py (799 lines) with: - 4 tool handlers + register_handlers(mcp) wiring function - All lifecycle helpers (_get_openspace, _get_store, etc.) - Upload metadata helpers (_write/_read_upload_meta) - Cloud import helpers (_cloud_search_and_import, _do_import_cloud_skill) - Result formatting (_format_task_result, _json_ok, _json_error) - Slim mcp_server.py to 220 lines (was 992): bootstrap, FastMCP, server entry - Update test imports: test_auto_import_disabled, test_integration, test_traceback_safety now reference openspace.mcp.tool_handlers - Add 20 new tests in test_mcp_tool_handlers.py All 1,376 tests pass, 117 skipped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1a37f0f commit c0562b5

7 files changed

Lines changed: 1076 additions & 835 deletions

File tree

openspace/mcp/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""OpenSpace MCP sub-package — decomposed from mcp_server.py (P4 Epics 4.7-4.9)."""

0 commit comments

Comments
 (0)