Coverage for gco_mcp / tools / crossplane.py: 100.00%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-10-28 16:19 +0000

1"""Self-managed Crossplane MCP tool (read-only wrapper over `gco crossplane status`). 

2 

3There is intentionally no ``crossplane open`` / ``screenshot`` tool — those are 

4interactive, long-running port-forwards to the Crossview dashboard. 

5""" 

6 

7import asyncio 

8 

9import cli_runner 

10from audit import audit_logged 

11from server import mcp 

12 

13 

14@mcp.tool(tags={"safe", "crossplane"}) 

15@audit_logged 

16async def crossplane_status() -> str: 

17 """`gco crossplane status` — the configured self-managed Crossplane (cdk.json helm.crossplane). 

18 

19 Reports whether Crossplane and its Crossview dashboard are enabled, the 

20 pinned charts, the composition functions GCO installs and how to reach 

21 the dashboard. Reads cdk.json, charts.yaml and the shipped manifest only. 

22 """ 

23 return await asyncio.to_thread(cli_runner._run_cli, "crossplane", "status")