Skip to content

feat(mcp): query Google Cloud metrics live with PromQL - #1478

Open
JeremyFunk wants to merge 34 commits into
feat/gcp-promql-widgetfrom
feat/gcp-promql-mcp
Open

JeremyFunk wants to merge 34 commits into
feat/gcp-promql-widgetfrom
feat/gcp-promql-mcp

Merge branch 'feat/gcp-promql-widget' into feat/gcp-promql-mcp

7bccd6c
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review completed Oct 16, 2026 in 56s

Confidence 7/10 · 1 issue to address

🟢 Confidence 7/10 · likely safe to merge
The tools are contained and tested, but the two open rendering defects are still in the head's chat path.
quality 88/100 · 1 warning · 1 note · tests covered · risk medium · 2/2 new units observable

Adds two public MCP tools that read Google Cloud Monitoring live over Google's PromQL API, their output schemas, chart/table rendering and the ai Worker's Google key binding. Safe to merge once the two open chat-rendering issues are fixed.

  • query_gcp_promql and find_gcp_metrics register as public read-only MCP tools
  • Range results draw through promQlChartRows; instant results as a table
  • The ai Worker binds MAPLE_GCP_SERVICE_ACCOUNT_KEY and GcpPromQlService joins the MCP runtime

Before merge

  • Secret · Add MAPLE_GCP_SERVICE_ACCOUNT_KEY to the ai app's prd and dev secret stores; without it both tools answer unavailable · apps/ai/src/worker.ts:68

Still open from earlier reviews

Production impact

Telemetry this change adds and removes (2)
  • ➕ span name McpTool.findGcpMetrics · apps/ai/src/mcp/tools/gcp-promql.ts:130
  • ➕ span name McpTool.queryGcpPromQl · apps/ai/src/mcp/tools/gcp-promql.ts:327
Observability coverage: 2 of 2 changes observable
Change Kind Observable Evidence
query_gcp_promql MCP tool Consumer span yes Effect.fn("McpTool.queryGcpPromQl") with annotateCurrentSpan at apps/ai/src/mcp/tools/gcp-promql.ts:327,338,365
find_gcp_metrics MCP tool Consumer span yes Effect.fn("McpTool.findGcpMetrics") with annotateCurrentSpan at apps/ai/src/mcp/tools/gcp-promql.ts:130,156

7bccd6c · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.