Count documents
es_countCount documents matching a query in a specified index. Get the total count directly without retrieving search results, reducing resource usage.
Instructions
Count documents matching a query. Cheaper than a search when only the total matters.
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_count"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | Index or pattern | |
| query | No | Query DSL "query" clause |