feat(mcp): Consolidate context tools into unified 'context' tool

Merge set_context, where_am_i, and init into a single 'context' tool
with action parameter (set, show, init).

- set: Set the workspace root directory (default when workspace_root provided)
- show: Show current workspace context (default when no args)
- init: Initialize beads in the current workspace directory

This reduces tool count from 3 to 1 while maintaining all functionality.

Closes beads-eub

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Steve Yegge
2025-12-19 23:30:22 -08:00
parent 2dc0c9b16e
commit e1d40733c6
5 changed files with 136 additions and 49 deletions

View File

@@ -295,7 +295,7 @@ async def test_mcp_works_with_separate_databases(git_worktree_with_separate_dbs,
# Create MCP client
async with Client(mcp) as client:
# Set context to worktree
await client.call_tool("set_context", {"workspace_root": str(worktree)})
await client.call_tool("context", {"workspace_root": str(worktree)})
# Create issue via MCP
result = await client.call_tool(