get_anomaly_history
Retrieve historical anomaly scores for a service from the TSDB to support post-incident analysis, post-mortem reconstruction, and trend evaluation.
Instructions
Replay historical anomaly scores for a service from the TSDB the gateway writes to (omcp_anomaly_score series). When to use: post-mortem reconstruction, trend analysis on detector noise, or pulling context for the LLM when an incident is reviewed after the fact. Prerequisites: the operator must have OMCP_ANOMALY_HISTORY_REMOTE_WRITE configured AND a Prometheus source pointed at the same TSDB so the round-trip closes. Behavior: read-only. Returns the time-series of scores. Empty result means either no anomalies in the window or history is disabled. Related: detect_anomalies for the live scores; query_metrics if you want to write the PromQL by hand.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"service": "<service>"
},
"name": "get_anomaly_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| method | No | Filter by detector method ('mad' / 'seasonality' / 'correlator'). Optional. | |
| service | Yes | Service name to filter on. | |
| duration | No | Rolling window, e.g. '1h', '24h'. Default '1h'. |