count_docs
Count documents in an Elasticsearch index, with optional query filtering to match specific documents.
Instructions
Count documents matching a query.
Args: index: Index to count. query: Optional query to filter documents.
Returns: Document count.
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": "count_docs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| query | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||