search_logs
Query Dynatrace log records by time range, filters, sort order, and pagination to troubleshoot errors and inspect events.
Instructions
Search log records (GET /api/v2/logs/search). Needs scope logs.read.
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": "search_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sort | No | timestamp or -timestamp | -timestamp |
| limit | No | ||
| query | No | Log query, e.g. status="ERROR" AND content="timeout". Empty = all | |
| to_time | No | End: now, ISO-8601 or epoch ms | now |
| from_time | No | Start: now-2h, ISO-8601 (2026-10-31T10:00:00Z) or epoch ms | now-2h |
| next_slice_key | No | nextSliceKey from the previous result |