veryfront__query_project_metrics
Requires project.metrics.read.
Access
No external-service connection is required. Use a Veryfront credential with access to the requested resources.
Call type: Read-only.
Arguments
| Field | Type | Required | Description and constraints |
|---|---|---|---|
metric | string | Yes | Prometheus metric name. Raw PromQL is not accepted. Minimum length: 1. Maximum length: 200. |
start | string | No | Start time (RFC 3339). Defaults to 1 hour ago. Metrics are kept for 395 days and one query spans at most 31 days; an older start or a wider range returns 400. Format: date-time. |
end | string | No | End time (RFC 3339). Defaults to now. Format: date-time. |
step | string | No | Prometheus query step, for example 60s. Default: "60s". Minimum length: 1. Maximum length: 20. |
aggregation | string | No | Aggregation to apply to the project-scoped metric selector. Default: "none". Values: "none", "sum", "avg", "min", "max", "count". |
labels | object | No | Optional allowlisted label filters such as environment, service_name or status_code. environment is the project environment on every metric: its name, matched case-insensitively, or preview for a branch. ai_gateway_* metrics carry it for calls made by a project run. Unknown, platform (deployment_environment) and project-scope labels are rejected. |
project_reference | string | No | Project ID or slug |
Example request
Send this JSON-RPC request through an initialized MCP client. Replace sample identifiers and values before calling the tool. See MCP client setup.
request.json
1{2 "jsonrpc": "2.0",3 "id": 1,4 "method": "tools/call",5 "params": {6 "name": "veryfront__query_project_metrics",7 "arguments": {8 "metric": "example"9 }10 }11}Result
The published output shape is summarized below. Inspect both the MCP response content and isError when handling a call.
| Field | Type | Required | Description and constraints |
|---|---|---|---|
series | object[] | Yes | List of series associated with this tool result. |
stats | object | Yes | Structured stats details associated with this tool result. |
Full schemas
input-schema.json
1{2 "type": "object",3 "properties": {4 "metric": {5 "type": "string",6 "minLength": 1,7 "maxLength": 200,8 "description": "Prometheus metric name. Raw PromQL is not accepted."9 },10 "start": {11 "type": "string",12 "format": "date-time",13 "description": "Start time (RFC 3339). Defaults to 1 hour ago. Metrics are kept for 395 days and one query spans at most 31 days; an older start or a wider range returns 400."14 },15 "end": {16 "type": "string",17 "format": "date-time",18 "description": "End time (RFC 3339). Defaults to now."19 },20 "step": {21 "type": "string",22 "minLength": 1,23 "maxLength": 20,24 "description": "Prometheus query step, for example 60s.",25 "default": "60s"26 },27 "aggregation": {28 "type": "string",29 "enum": [30 "none",31 "sum",32 "avg",33 "min",34 "max",35 "count"36 ],37 "description": "Aggregation to apply to the project-scoped metric selector.",38 "default": "none"39 },40 "labels": {41 "type": "object",42 "additionalProperties": {43 "type": "string",44 "description": "Additional structured values supplied to the tool."45 },46 "description": "Optional allowlisted label filters such as environment, service_name or status_code. environment is the project environment on every metric: its name, matched case-insensitively, or preview for a branch. ai_gateway_* metrics carry it for calls made by a project run. Unknown, platform (deployment_environment) and project-scope labels are rejected."47 },48 "project_reference": {49 "type": "string",50 "description": "Project ID or slug"51 }52 },53 "required": [54 "metric"55 ],56 "additionalProperties": false,57 "description": "Use after logs or traces for counters, rates, latency buckets, usage, or runtime health metrics. The API injects project scope; raw PromQL is not accepted. The result is never partial: more than 100 series, a series with more than 11,000 points or a result over 8 MiB is refused, so add a label filter, choose an aggregation, or use a coarser step or a shorter range.",58 "$schema": "http://json-schema.org/draft-07/schema#"59}output-schema.json
1{2 "type": "object",3 "properties": {4 "series": {5 "type": "array",6 "items": {7 "type": "object",8 "properties": {9 "metric": {10 "type": "string"11 },12 "labels": {13 "type": "object",14 "additionalProperties": {15 "type": "string",16 "description": "Additional structured values associated with this result."17 },18 "description": "Structured labels details associated with this tool result."19 },20 "points": {21 "type": "array",22 "items": {23 "type": "object",24 "properties": {25 "timestamp": {26 "type": "string"27 },28 "value": {29 "type": "number"30 }31 },32 "required": [33 "timestamp",34 "value"35 ],36 "additionalProperties": false37 },38 "description": "List of points associated with this tool result."39 }40 },41 "required": [42 "metric",43 "labels",44 "points"45 ],46 "additionalProperties": false47 },48 "description": "List of series associated with this tool result."49 },50 "stats": {51 "type": "object",52 "properties": {53 "query_time_ms": {54 "type": "number"55 }56 },57 "required": [58 "query_time_ms"59 ],60 "additionalProperties": false,61 "description": "Structured stats details associated with this tool result."62 }63 },64 "required": [65 "series",66 "stats"67 ],68 "additionalProperties": false,69 "description": "Structured result returned by the query_project_metrics tool.",70 "$schema": "http://json-schema.org/draft-07/schema#"71}