Query metrics

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

FieldTypeRequiredDescription and constraints
metricstringYesPrometheus metric name. Raw PromQL is not accepted. Minimum length: 1. Maximum length: 200.
startstringNoStart 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.
endstringNoEnd time (RFC 3339). Defaults to now. Format: date-time.
stepstringNoPrometheus query step, for example 60s. Default: "60s". Minimum length: 1. Maximum length: 20.
aggregationstringNoAggregation to apply to the project-scoped metric selector. Default: "none". Values: "none", "sum", "avg", "min", "max", "count".
labelsobjectNoOptional 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_referencestringNoProject 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
{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/call",  "params": {    "name": "veryfront__query_project_metrics",    "arguments": {      "metric": "example"    }  }}

Result

The published output shape is summarized below. Inspect both the MCP response content and isError when handling a call.

FieldTypeRequiredDescription and constraints
seriesobject[]YesList of series associated with this tool result.
statsobjectYesStructured stats details associated with this tool result.

Full schemas

input-schema.json
{  "type": "object",  "properties": {    "metric": {      "type": "string",      "minLength": 1,      "maxLength": 200,      "description": "Prometheus metric name. Raw PromQL is not accepted."    },    "start": {      "type": "string",      "format": "date-time",      "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."    },    "end": {      "type": "string",      "format": "date-time",      "description": "End time (RFC 3339). Defaults to now."    },    "step": {      "type": "string",      "minLength": 1,      "maxLength": 20,      "description": "Prometheus query step, for example 60s.",      "default": "60s"    },    "aggregation": {      "type": "string",      "enum": [        "none",        "sum",        "avg",        "min",        "max",        "count"      ],      "description": "Aggregation to apply to the project-scoped metric selector.",      "default": "none"    },    "labels": {      "type": "object",      "additionalProperties": {        "type": "string",        "description": "Additional structured values supplied to the tool."      },      "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."    },    "project_reference": {      "type": "string",      "description": "Project ID or slug"    }  },  "required": [    "metric"  ],  "additionalProperties": false,  "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.",  "$schema": "http://json-schema.org/draft-07/schema#"}
output-schema.json
{  "type": "object",  "properties": {    "series": {      "type": "array",      "items": {        "type": "object",        "properties": {          "metric": {            "type": "string"          },          "labels": {            "type": "object",            "additionalProperties": {              "type": "string",              "description": "Additional structured values associated with this result."            },            "description": "Structured labels details associated with this tool result."          },          "points": {            "type": "array",            "items": {              "type": "object",              "properties": {                "timestamp": {                  "type": "string"                },                "value": {                  "type": "number"                }              },              "required": [                "timestamp",                "value"              ],              "additionalProperties": false            },            "description": "List of points associated with this tool result."          }        },        "required": [          "metric",          "labels",          "points"        ],        "additionalProperties": false      },      "description": "List of series associated with this tool result."    },    "stats": {      "type": "object",      "properties": {        "query_time_ms": {          "type": "number"        }      },      "required": [        "query_time_ms"      ],      "additionalProperties": false,      "description": "Structured stats details associated with this tool result."    }  },  "required": [    "series",    "stats"  ],  "additionalProperties": false,  "description": "Structured result returned by the query_project_metrics tool.",  "$schema": "http://json-schema.org/draft-07/schema#"}