queryPointInTimeMetrics
Execute point-in-time queries for one or more engineering metrics.
Returns current metric values for specified time periods, with support for batch queries
and optional period-over-period comparisons. Time range (startTime/endTime) cannot exceed 6 months (180 days).
PREREQUISITES - Follow this workflow:
1. Discover all available metrics ONCE: Call listMetricDefinitions (view='basic') - cache this response
2. Get metric query metadata ONCE per metric: Call listMetricDefinitions (view='full', key=METRIC_KEY)
- supportedAggregations: Valid aggregation methods
- orderByAttribute: Attribute path for sorting by metric values
- groupByOptions[].key: Valid groupBy keys (use exact values, do NOT guess)
- filterOptions[].key: Valid filter keys (use exact values, do NOT guess)
Cache the full view response for each metric. Reuse the metadata from cached responses for subsequent queries on the same metric.
3. Construct query: Use the query metadata from the full view responses in step 2 to build valid point-in-time requests
IMPORTANT: Cache only results from listMetricDefinitions. Do NOT cache point-in-time query results - always execute fresh queries for current data.
Only refresh cached listMetricDefinitions responses if no longer in your context window or explicitly requested.
Do NOT guess attribute names - always use exact values from listMetricDefinitions responses.
Response includes:
- Lightweight metadata: Column definitions optimized for programmatic use
- Row data: Actual metric values and dimensional data
- No heavy schemas: Source definitions excluded (get from listMetricDefinitions instead)
Error responses:
- 400: Invalid metric names, date range, validation errors, or unsupported metric combinations
- 403: Feature not enabled (contact help@cortex.io)Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | Yes | Maximum number of results to return | |
| context | Yes | Explain why you're invoking this tool now and how its output will be used. Then state how this call supports your *overall objective* and fits into your broader plan across all tool calls (e.g., why this tool vs. others, and what step it unblocks). Never share any personal details or sensitive information. | |
| endTime | Yes | End time for the query period | |
| filters | Yes | Filters to apply to the data | |
| groupBy | Yes | Fields to group results by | |
| metrics | Yes | List of metrics to query with their aggregation functions | |
| orderBy | Yes | Sort order for results | |
| nextPage | No | Pagination token for next page of results | |
| startTime | Yes | Start time for the query period | |
| comparison | No | ||
| nestedGroupBy | No | Fields to group nested results by | |
| nestedMetrics | No | Optional nested metrics for advanced queries | |
| timeAttribute | No | Time attribute to use for queries | |
| nestedTimeAttribute | No | Time attribute for nested queries |