Skip to content

feat(mcp): service_deployments, route_usage, ingest_freshness, db_query_volume and ingest_usage - #1233

Merged
Makisuo merged 8 commits into
fix/mcp-misc-tool-gapsfrom
feat/mcp-deploy-ingest-route-tools
Oct 3, 2026
Merged

Makisuo merged 8 commits into
fix/mcp-misc-tool-gapsfrom
feat/mcp-deploy-ingest-route-tools

Merge fix/mcp-misc-tool-gaps into feat/mcp-deploy-ingest-route-tools

e700b5f
Select commit
Loading
Failed to load commit list.
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.

  • serviceDeploymentsQuery ranks versions per (service, environment) with row_number() before the global limit
  • routeUsageQuery splices raw, minutely and hourly operations tiers into METHOD /route usage
  • ingestFreshnessQuery/logsFreshnessQuery probe newest signal timestamps, traces from service_operations_minutely
  • dbQueryVolumeQuery unions 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 LastSeen clamped to endTime and bounded by FirstSeen <= endTime (liveness.ts:175-181)
  • db_query_volume sealed branch applies collapseHyperdriveNs like 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.