count_documents
Count documents within a specified Elasticsearch index, optionally filtered by a query, to efficiently track data volume using the octodet-elasticsearch-mcp server.
Instructions
Count documents in an index, optionally filtered by a query
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | Name of the Elasticsearch index to count documents in | |
| query | No | Optional Elasticsearch query to filter documents to count |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"index": {
"description": "Name of the Elasticsearch index to count documents in",
"minLength": 1,
"type": "string"
},
"query": {
"additionalProperties": {},
"description": "Optional Elasticsearch query to filter documents to count",
"type": "object"
}
},
"required": [
"index"
],
"type": "object"
}