es_search
Search Elasticsearch indices using Query DSL. Specify index, query, size, pagination, and sort to retrieve matching documents.
Instructions
Execute a search query using Elasticsearch Query DSL.
Args: index: Index to search (supports wildcards like "logs-*"). query: Elasticsearch query DSL (e.g., {"match": {"message": "error"}}). size: Maximum results to return (default: 10, max: from config). from_: Starting offset for pagination. sort: Sort specification (e.g., [{"@timestamp": "desc"}]).
Returns: Search hits with _id, _score, and _source fields.
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": {
"index": "<index>"
},
"name": "es_search"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| query | No | ||
| size | No | ||
| from_ | No | ||
| sort | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||