get_logs
Query ServiceNow system, journal, transaction, or background logs by level, timeframe, source, user, status, or text to troubleshoot issues.
Instructions
Query ServiceNow logs. log_type: system/journal/transaction/background. Max 20 rows.
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": {
"log_type": "<log_type>"
},
"name": "get_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | [background] Execution name LIKE | |
| level | No | [system] trace|debug|info|warning|error|fatal or number | |
| limit | No | ||
| query | No | Raw encoded query appended | |
| state | No | [background] running|complete|cancelled | |
| table | No | ||
| offset | No | ||
| source | No | [system/background] Source LIKE | |
| contains | No | Text search (message/value) | |
| log_type | Yes | Log type | |
| timeframe | No | Time filter | last_24h |
| created_by | No | [journal/transaction] User filter | |
| field_name | No | [journal] work_notes|comments | |
| url_contains | No | [transaction] URL LIKE | |
| record_sys_id | No | [journal] Record sys_id | |
| max_text_length | No | ||
| response_status | No | [transaction] HTTP status | |
| min_response_time_ms | No |