feat(mcp): service_deployments, route_usage, ingest_freshness, db_query_volume and ingest_usage - #1233
Merged
Makisuo merged 8 commits intoOct 3, 2026
Maple Review Bot / Maple / review
completed
Oct 3, 2026 in 7m 9s
Confidence 3/5 · No issues found
🟡 Confidence 3/5 · needs attention
quality 100/100 · no findings · tests partial · risk medium · 5/5 new units observable
Warning
This review ended early; what follows is what it established.
Adds five read-only MCP tools (service_deployments, route_usage, ingest_freshness, db_query_volume, ingest_usage) with the query builders, output schemas and benchmark fixtures behind them. All are tenant-scoped and read existing rollups, so the change is safe to merge. The new test file was not read before the pass ended.
serviceDeploymentsQueryranks versions per (service, environment) withrow_number()before the global limitrouteUsageQuerysplices raw, minutely and hourly operations tiers intoMETHOD /routeusageingestFreshnessQuery/logsFreshnessQueryprobe newest signal timestamps, traces fromservice_operations_minutelydbQueryVolumeQueryunions the query-shape rollup with a raw edge mirroring its write filter
What was checked
- Every new builder filters
OrgId(releases.ts:342,liveness.ts:154,service-operations.ts:455,service-map.ts:1400) - Metrics
LastSeenclamped toendTimeand bounded byFirstSeen <= endTime(liveness.ts:175-181) db_query_volumesealed branch appliescollapseHyperdriveNslike the raw branch (service-map.ts:1388,service-map.ts:1412)
Observability coverage: 5 of 5 changes observable
| Change | Kind | Observable | Evidence |
|---|---|---|---|
| service_deployments warehouse read | outbound DB query | yes | executor.compiledQuery with profile/context at apps/ai/src/mcp/tools/service-deployments.ts:84 |
| route_usage warehouse read | outbound DB query | yes | executor.compiledQuery at apps/ai/src/mcp/tools/route-usage.ts:60 |
| ingest_freshness three probe reads | outbound DB query | yes | executor.compiledQuery with contexts at apps/ai/src/mcp/tools/ingest-freshness.ts:106-114 |
| db_query_volume warehouse read | outbound DB query | yes | executor.compiledQuery at apps/ai/src/mcp/tools/db-query-volume.ts:55 |
| ingest_usage warehouse read | outbound DB query | yes | executor.compiledQuery at apps/ai/src/mcp/tools/ingest-usage.ts:99 |
Files not reviewed (1)
The review ended before it read these diffs, so nothing above vouches for them.
apps/ai/src/mcp/tools/__tests__/service-activity-tools.test.ts
e700b5f · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.
Loading