cosmosdb_count_items
Count items in a Cosmos DB container. Optionally filter with a SQL WHERE clause to count specific items.
Instructions
Count items in a Cosmos DB container, with an optional filter.
where accepts a SQL WHERE clause body (without the WHERE keyword), e.g.: c.status = 'active' c.createdAt > '2025-01-01'
If where is omitted, counts all items in the container. Returns a JSON object with a 'count' field.
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": {
"account": "<account>",
"database": "<database>",
"container": "<container>"
},
"name": "cosmosdb_count_items"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | ||
| database | Yes | ||
| container | Yes | ||
| where | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |