es_count
Count documents in an Elasticsearch index matching a query, or all documents if no query is provided.
Instructions
Count documents in an index matching a query (or all documents if no query is given).
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 name. | |
| query | No | Elasticsearch Query DSL object, e.g. { "match": { "title": "foo" } }. Defaults to match_all. | |
| connectionId | No | Id of the elasticsearch connection to use, from databases.config.yml. Optional when only one elasticsearch connection is configured. |