get_context
Retrieve full log entries surrounding a specific timestamp to understand what happened before and after an event, aiding in troubleshooting.
Instructions
Get full log entries around a specific timestamp — like grep -C for logs. Shows what happened before and after an event for troubleshooting.
Args: path: Path to local OpenSearch JSON file. index: OpenSearch index to query (requires OPENSEARCH_URL env). timestamp: Center timestamp (ISO format, e.g. "2026-06-03T01:05:05Z"). window_seconds: Seconds before and after timestamp to include (default 5). pod: Optional pod name filter — only show entries from this pod. limit: Max entries to return (default 50).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_context"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pod | No | ||
| path | No | ||
| index | No | ||
| limit | No | ||
| timestamp | No | ||
| window_seconds | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |