Query metrics

Query project metrics. Requires project.metrics.read.

Arguments

  • metricstring · min length 1 · max length 200required

    Prometheus metric name. Raw PromQL is not accepted.

  • startstring · date-time

    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.

  • endstring · date-time

    End time (RFC 3339). Defaults to now.

  • stepstring · min length 1 · max length 20 · default 60s

    Prometheus query step, for example 60s.

  • aggregationstring · default none

    Aggregation to apply to the project-scoped metric selector. One of none, sum, avg, min, max, count.

  • labelsobject

    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_referencestring

    Project ID or slug

Responses

curl -X POST -N "https://api.veryfront.com/mcp" \  -H "Authorization: Bearer $VERYFRONT_API_KEY" \  -H "Accept: application/json, text/event-stream" \  -H "Content-Type: application/json" \  -d '{  "jsonrpc": "2.0",  "id": 1,  "method": "tools/call",  "params": {    "name": "veryfront__query_project_metrics",    "arguments": {      "metric": "string"    }  }}'
{  "jsonrpc": "2.0",  "id": 1,  "result": {    "content": [      {        "type": "text",        "text": "{\"series\":[{\"metric\":\"string\",\"labels\":{},\"points\":[{\"timestamp\":\"string\",\"value\":0}]}],\"stats\":{\"query_time_ms\":0}}"      }    ],    "structuredContent": {      "series": [        {          "metric": "string",          "labels": {},          "points": [            {              "timestamp": "string",              "value": 0            }          ]        }      ],      "stats": {        "query_time_ms": 0      }    }  }}

The tool ran; its output is result.structuredContent.