search-logs
Search Datadog logs by query and time range to isolate issues or analyze trends.
Instructions
Search Datadog logs by query with time range filtering
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": {
"query": "<query>",
"from": "<from>",
"to": "<to>"
},
"name": "search-logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Datadog log query. Example: service:web-api status:error @http.status_code:[500 TO 599] | |
| from | Yes | Start time (ISO 8601). Example: 2026-02-26T00:00:00Z | |
| to | Yes | End time (ISO 8601). Example: 2026-02-26T23:59:59Z | |
| limit | No | Max results (default 50, max 1000) | |
| sort | No | Sort order: -timestamp (newest first) or timestamp (oldest first) | -timestamp |
| indexes | No | Log indexes to search. Example: ["main"] | |
| extractFields | No | Comma-separated dotted paths to project from response (e.g. 'id,name,owner.name,columns.*.name'). Use `*` as wildcard for arrays/objects. Wrap field names with dots in backticks. Reduces response tokens dramatically on large entities. |