Add MCP tools for migration inspection (bd-627d Phase 3)
- Add inspect_migration() tool - calls bd migrate --inspect --json - Add get_schema_info() tool - calls bd info --schema --json - Implements abstract methods in BdClientBase - CLI client calls commands directly - Daemon client raises NotImplementedError (rare admin commands) Phase 3 complete. Agents can now inspect migrations via MCP before running them. Amp-Thread-ID: https://ampcode.com/threads/T-de7e1141-87ac-4b4a-9cea-1b7bc4d51da9 Co-authored-by: Amp <amp@ampcode.com>
This commit is contained in:
@@ -430,6 +430,28 @@ class BdDaemonClient(BdClientBase):
|
||||
# This is a placeholder for when it's added
|
||||
raise NotImplementedError("Blocked operation not yet supported via daemon")
|
||||
|
||||
async def inspect_migration(self) -> dict:
|
||||
"""Get migration plan and database state for agent analysis.
|
||||
|
||||
Returns:
|
||||
Migration plan dict with registered_migrations, warnings, etc.
|
||||
|
||||
Note:
|
||||
This falls back to CLI since migrations are rare operations
|
||||
"""
|
||||
raise NotImplementedError("inspect_migration not supported via daemon - use CLI client")
|
||||
|
||||
async def get_schema_info(self) -> dict:
|
||||
"""Get current database schema for inspection.
|
||||
|
||||
Returns:
|
||||
Schema info dict with tables, version, config, sample IDs, etc.
|
||||
|
||||
Note:
|
||||
This falls back to CLI since schema inspection is a rare operation
|
||||
"""
|
||||
raise NotImplementedError("get_schema_info not supported via daemon - use CLI client")
|
||||
|
||||
async def add_dependency(self, params: AddDependencyParams) -> None:
|
||||
"""Add a dependency between issues.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user