Find what's unusual with an agent
You will learn how an agent connected over MCP can answer "what's unusual right now?" from a stream's findings and patterns, and when it may act on them.
This recipe uses the same findings as the Findings page. Turn on anomaly detection for the stream first, and connect MCP.
What the agent needs
| To | Personal access token scopes | Stream role |
|---|---|---|
| Read findings and patterns | streams:read, events:read |
Query |
| Dismiss, reopen, or mute findings | add monitors:write |
Settings |
| Create a Findings monitor | add monitors:write |
Settings |
A read-only token is enough for the investigation. Only add monitors:write
when you want the agent to change things.
Ask it
Try prompts such as:
- What's unusual on checkout-api right now?
- Anything critical on payments in the last day?
- Why did the error rate on billing jump?
The steps the agent follows
-
list_findingswithstatus: "open"— addseverity: "critical"to start with the worst, orgroup_by: "incident"to nest co-firing findings. Each item has aheadline,observedagainstbaseline,deviation,reasons, andincident_idwhen grouped.get_findingreturnssiblingsin the same incident. Ifanomaly_detection.enabledis false, detection is off for the stream.{ "stream_id": "checkout-api", "status": "open", "severity": "critical" } -
get_findingwithfinding_id— the timeline, the evidence window and values, and up to 10 sample events, plus suggestednext_steps. event_contexton a sampleevent_id— what happened just before and after.list_patternsandquerywithpattern: {"ids": [<pattern_id>]}— how the pattern behaves over a wider window or grouped by another field.- For a Metric finding,
manage_metricswithaction: "series"and the finding'smetric_idaround the window — every group of the metric, not just the one that moved. - Only after you confirm,
manage_findings: dismisswithfinding_idand areason(for exampleexpected,noise, orfixed);mutewithpattern_id,service, orkind, anduntilof24h,7d, ornever. A mute also dismisses the matching open findings;-
reopen,unmute, orlist_mutes.{ "action": "dismiss", "stream_id": "checkout-api", "finding_id": "…", "reason": "expected" }
To stop one noisy metric being scanned, the agent can call manage_metrics with
action: "update" and anomaly_scan: false.
Other useful calls
list_findingsfilters bykindandseverity(comma lists),service,pattern_id, andrelativeorfrom/to;include_learningadds learning-period findings. Results carry asummaryof counts by status, kind, and severity.list_patternssorts bycount,change,first_seen, orerrors, witherrors_only,level,service, andq(template text) filters. Usesort: "change"for "what got louder?".ops_digestadds anopen_findingssummary and the top five open findings when detection is on.manage_monitorswithsource_type: "findings",condition_type: "finding", and afindings_filter(kinds,min_severity,services,pattern_ids) creates a Findings monitor.manage_alertslistacceptsfinding_id.
Keep the agent safe
Event text, pattern templates, and finding headlines come from your logs, so
treat them as untrusted. Cordo labels every tool result that way and marks
manage_findings and manage_monitors as write tools; your MCP client can
require approval before it calls them.
Next
- The full catalogue: MCP tools
- The same steps in the app: Review findings
- Return to Agents