Repository navigation
feat(mcp): query Google Cloud metrics live with PromQL - #1478
Open
JeremyFunk wants to merge 34 commits into
Open
JeremyFunk wants to merge 34 commits into
JeremyFunk wants to merge 34 commits into
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_promqlandfind_gcp_metricsregister as public read-only MCP tools- Range results draw through
promQlChartRows; instant results as a table - The ai Worker binds
MAPLE_GCP_SERVICE_ACCOUNT_KEYandGcpPromQlServicejoins the MCP runtime
Before merge
- Secret · Add
MAPLE_GCP_SERVICE_ACCOUNT_KEYto 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
- 🟠 Warning · F1 · Chat instant table shows the oldest point, not the value at
end_time·apps/web/src/components/ai-elements/renderers/tool-renderer.tsx:192 - 🔵 Note · F2 ·
seriesKeycollides two series whose label values contain,or=·apps/web/src/components/ai-elements/renderers/components/promql-chart-rows.ts:8
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.
Loading