Query SAP Cloud ALM analytics
calm_analyticsCount and break down SAP Cloud ALM records across the tenant by querying analytics providers; use count_only for totals or group_by for status/project breakdowns.
Instructions
Query an SAP Cloud ALM analytics provider (Defects, Tasks, Tests, Features, Projects, Metrics, ...). Supports $filter, and aggregates: it is the tool for tenant-wide totals and breakdowns. It does NOT sort — $orderby is ignored, so sort the records yourself. Every provider spans the whole tenant, so this is how you count without naming a project: count_only=true for a total, group_by="status" for a breakdown (Defects: "defectStatus"). Tasks covers user stories, defects and requirements; filter them by type CODE, e.g. filter="typeID eq 'CALMUS'" (the type text is silently ignored).
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": {
"provider": "<provider>"
},
"name": "calm_analytics"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | Maximum number of records (page size) | |
| skip | No | Records to skip (page offset) | |
| filter | No | OData $filter, e.g. "status eq 'CIPDFCTOPEN'" | |
| period | No | Analytics time window, sent inside $filter. Format <L|C><n><H|D|W|M|Y>, e.g. "L1D" (last day) or "C1M" (current month). Counting defaults to "C1D" so each record is counted once | |
| select | No | OData $select — comma-separated field list | |
| group_by | No | Comma-separated field name(s) to break the count down by, e.g. "status" or "projectName,status". Returns {total, groups:[{value,count}]} instead of records. Also the quickest way to discover which values a field actually takes | |
| provider | Yes | Analytics provider (e.g. Defects, Tasks, Tests). Every provider spans the whole tenant, so this is the only way to count without naming a project. It aggregates but does not sort: the service ignores $orderby, so never present its output as sorted | |
| count_only | No | Return ONLY the total number of matching records, no records at all. Use this for every "how many ...?" question — the answer is a few hundred bytes instead of hundreds of KB. Works for every resource and provider | |
| resolution | No | Analytics bucket size, sent inside $filter: D, W, M or Y. A record appears once per bucket, so a wide window with a small bucket multiplies the count. Counting defaults to "D" | |
| with_count | No | Return the total as "@count" ALONGSIDE the records (OData resources and analytics only). For a total without the records, use count_only instead | |
| group_limit | No | Maximum groups returned by group_by (default 50); the rest fold into otherCount |