Repository navigation
feat(mcp): SLO tools - #2297
feat(mcp): SLO tools#2297
Conversation
list_slos shows each SLO's SLI, budget left and worst burn rate, breaching tiers first. inspect_slo shows the 5m/30m/1h/6h burn windows, which tier breaches and the alerting, and points at the rule's incident timeline. Writes need alerts:manage. Burn-rate incidents in list_alert_incidents and get_incident_timeline now point at their SLO instead of list_alert_rules.
inspect_slo and list_slos read the evaluator's breach/hold/clear tier state, so an outage reads as holding, not quiet. Incident hints name the SLO by the incident's rule id, which survives an SLO rename. Tier text comes from the tier constants.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 3 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This comment has been minimized.
This comment has been minimized.
P.optionalText reads a blank string as absent, so the empty-string branch could never run.
|
F1 fixed: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Maple review🟢 Confidence 10/10 · safe to merge. The delta file has no diff versus base and the rest was reviewed with no open findings. No reviewable change remains at this head: the only file listed as updated since the last review, Production impactOpen errors in the changed files (2)
After this merges, Maple checks whether they stop.
|
Maple: after this shipped✅ Shipped clean. Nothing this change touches got worse in the hour after it deployed. Deployed to Errors in the changed files:
Maple looks once, an hour after the first deploy that carries the merge. |
Stack: #2293 model, #2294 latency ladder, #2295 compute, #2296 burn alerts, #2297 MCP, #2298 UI
Part 5 of 6: MCP tools for SLOs.
New tools
list_sloslists burning SLOs first, then the least budget left. Each row has its SLI, budget left, fastest burn, burning tier, and whether a tier is holding.inspect_sloreturns the config, each burn window, each tier's state (breach,holdorclear) and the alerting settings. Itsnextstep is the rule's incident timeline.create_slo,update_sloanddelete_sloneedalerts:manage. They are marked mutating, so the chat agent asks before running them.Changes to existing tools
list_alert_incidentsandget_incident_timelinenow point burn-rate incidents atinspect_slo, using the incident's rule id (which survives an SLO rename).inspect_sloaccepts an SLO name, an id,slo_…, or its alert rule'salrt_….Verification
slo-tools.test.tsruns the realSlosServiceon PGlite with a fake warehouse at a 20x burn. It covers list, inspect, create, update and delete, a member being refused, and lookup by rule id.registry.contract.test.tsand the regenerated tool descriptors pass.🤖 Generated with Claude Code