search
Run read-only SPL queries and return bounded result rows, blocking write, delete, export, or execute commands and applying time-range and row-limit safeguards.
Instructions
Run a read-only SPL search and return the result rows.
The search is validated first: commands that write, delete, export or execute (delete,
outputlookup, collect, sendemail, script, map, ...) are refused. A leading search is
added when missing and | head N is appended so results are always bounded.
Args:
spl: The SPL query, e.g. index=wineventlog EventCode=4625 | stats count by src_ip.
earliest: Start of the time range, Splunk syntax (default -24h).
latest: End of the time range (default now).
max_rows: Maximum rows to return (default 100, capped by the server, hard limit 1000).
Returns a dict with results (list of rows), count, spl (the SPL actually run),
and truncated when the row limit was reached. On failure returns {"error": ...}.
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": {
"spl": "<spl>"
},
"name": "search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spl | Yes | ||
| latest | No | now | |
| earliest | No | -24h | |
| max_rows | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||