# Get run analytics

Tool: `veryfront__get_account_run_analytics`

Return account run analytics.

## Arguments

| Name                | Type                    | Required | Description                                                                                                                                           |
| ------------------- | ----------------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| `account_id`        | string · uuid           |          | Account to report; omitted, use the authorized context account or caller default. Requires account.billing.read.                                      |
| `preset`            | string · default 30d    |          | Whole local days, defaulting to 30d. Explicit from/to bounds take precedence over preset, including SDK-supplied defaults. One of `7d`, `30d`, `90d`. |
| `from`              | string · date-time      |          | Inclusive start. Supply both from and to; these bounds take precedence over preset.                                                                   |
| `to`                | string · date-time      |          | Exclusive end, no later than the end of today in timezone.                                                                                            |
| `timezone`          | string · default UTC    |          | Provide the timezone.                                                                                                                                 |
| `granularity`       | string · default day    |          | UTC hours, or local calendar days, Monday-based weeks and months. One of `hour`, `day`, `week`, `month`.                                              |
| `group_by`          | array of string         |          | Grouping dimensions supported by this operation. Repeat the parameter or use a comma-separated list. One of `project`, `model`, `api_key`, `member`.  |
| `compare`           | string                  |          | Compare preceding calendar months for whole-month custom ranges, local days for whole-day ranges and presets, or equal elapsed duration otherwise.    |
| `label`             | array of string \| null |          | Project label filters as key or key=value, repeated or comma-separated.                                                                               |
| `project_reference` | string                  |          | Optional project UUID or slug to scope analytics to a single project.                                                                                 |

## Responses

| Status | Description                                           |
| ------ | ----------------------------------------------------- |
| 200    | The tool ran; its output is result.structuredContent. |

## Call it

```bash
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__get_account_run_analytics",
    "arguments": {}
  }
}'
```

## Example response

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      {
        "type": "text",
        "text": "{\"scope\":{\"kind\":\"account\",\"account_id\":\"00000000-0000-0000-0000-000000000000\",\"project_id\":\"00000000-0000-0000-0000-000000000000\"},\"group_by\":[\"project\"],\"summary\":{\"total_runs\":0,\"completed_runs\":0,\"failed_runs\":0,\"average_duration_ms\":0,\"p95_duration_ms\":0,\"last_run_at\":\"string\",\"previous\":{\"total_runs\":0,\"completed_runs\":0,\"failed_runs\":0,\"average_duration_ms\":0,\"p95_duration_ms\":0,\"last_run_at\":\"string\"}},\"timeframe\":{\"from\":\"2026-01-01T00:00:00Z\",\"to\":\"2026-01-01T00:00:00Z\",\"timezone\":\"string\",\"granularity\":\"hour\",\"bucket_count\":0,\"previous\":{\"from\":\"2026-01-01T00:00:00Z\",\"to\":\"2026-01-01T00:00:00Z\",\"timezone\":\"string\",\"granularity\":\"hour\",\"bucket_count\":0}},\"series\":[{\"runs\":0,\"completed_runs\":0,\"failed_runs\":0,\"bucket_start\":\"string\",\"groups\":[{\"runs\":0,\"completed_runs\":0,\"failed_runs\":0,\"dimensions\":{\"project_id\":\"00000000-0000-0000-0000-000000000000\"}}]}],\"statuses\":[{\"status\":\"string\",\"count\":0}],\"models\":[{\"provider\":\"string\",\"model\":\"string\",\"count\":0}],\"tools\":[{\"name\":\"string\",\"count\":0}],\"projects\":[{\"project_id\":\"00000000-0000-0000-0000-000000000000\",\"project_name\":\"string\",\"project_slug\":\"string\",\"count\":0}],\"recent_runs\":[{\"id\":\"00000000-0000-0000-0000-000000000000\",\"run_id\":\"string\",\"status\":\"pending\",\"project_id\":\"00000000-0000-0000-0000-000000000000\",\"target\":{\"type\":\"agent\",\"agent_kind\":\"project\",\"name\":\"string\",\"id\":\"string\"},\"input\":null,\"output\":null,\"error\":{\"code\":\"string\",\"message\":\"string\",\"details\":{}},\"title\":\"string\",\"labels\":{},\"parent_run_id\":\"00000000-0000-0000-0000-000000000000\",\"root_run_id\":\"00000000-0000-0000-0000-000000000000\",\"created_at\":\"2026-01-01T00:00:00Z\",\"updated_at\":\"2026-01-01T00:00:00Z\",\"started_at\":\"2026-01-01T00:00:00Z\",\"finished_at\":\"2026-01-01T00:00:00Z\",\"config\":{},\"execution\":{\"id\":\"00000000-0000-0000-0000-000000000000\",\"runtime_instance\":{\"id\":\"00000000-0000-0000-0000-000000000000\",\"name\":\"string\",\"mode\":\"service\"},\"runtime\":{\"type\":\"main_branch\"},\"timeout_seconds\":1,\"retry_limit\":0,\"attempt\":1,\"exit_code\":0,\"duration_ms\":0,\"tool_error_count\":0,\"logs\":\"string\",\"start_mode\":\"string\",\"worker\":{\"id\":\"00000000-0000-0000-0000-000000000000\",\"name\":\"string\",\"worker_key\":\"string\",\"implementation_kind\":\"string\",\"claimed_at\":\"2026-01-01T00:00:00Z\"}},\"control\":{\"waiting\":{\"resume_at\":\"2026-01-01T00:00:00Z\",\"reason\":\"manual_pause\"},\"pause\":{\"requested_at\":\"2026-01-01T00:00:00Z\"},\"cancellation\":{\"requested_at\":\"2026-01-01T00:00:00Z\",\"stopped_at\":\"2026-01-01T00:00:00Z\"}},\"task_id\":\"string\",\"conversation_id\":\"00000000-0000-0000-0000-000000000000\",\"input_message_id\":\"00000000-0000-0000-0000-000000000000\",\"output_message_id\":\"00000000-0000-0000-0000-000000000000\",\"batch_id\":\"00000000-0000-0000-0000-000000000000\",\"trigger\":{\"type\":\"user\",\"id\":\"00000000-0000-0000-0000-000000000000\"},\"usage\":{\"funding\":\"managed\",\"tokens\":{\"input\":0,\"output\":0,\"cache\":{\"read\":0,\"write\":0},\"reasoning\":0,\"total\":0},\"cost\":{\"currency\":\"EUR\",\"status\":\"estimated\",\"provider\":\"string\",\"platform\":\"string\",\"total\":\"string\",\"credits\":\"string\"},\"model_calls\":0,\"capture_status\":\"complete\"},\"descendants\":{\"total\":0,\"active\":0,\"has_failures\":false,\"usage\":{\"funding\":\"managed\",\"tokens\":{\"input\":0,\"output\":0,\"cache\":{\"read\":0,\"write\":0},\"reasoning\":0,\"total\":0},\"cost\":{\"currency\":\"EUR\",\"status\":\"estimated\",\"provider\":\"string\",\"platform\":\"string\",\"total\":\"string\",\"credits\":\"string\"},\"model_calls\":0,\"capture_status\":\"complete\"}},\"artifacts\":[{\"artifact_id\":\"string\",\"type\":\"string\",\"media_type\":\"string\",\"size_bytes\":0,\"sha256\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\",\"href\":\"https://example.com\"}],\"schemas\":{\"input\":{\"schema\":false,\"sha256\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"},\"output\":{\"schema\":false,\"sha256\":\"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\"}},\"metadata\":{}}]}"
      }
    ],
    "structuredContent": {
      "scope": {
        "kind": "account",
        "account_id": "00000000-0000-0000-0000-000000000000",
        "project_id": "00000000-0000-0000-0000-000000000000"
      },
      "group_by": [
        "project"
      ],
      "summary": {
        "total_runs": 0,
        "completed_runs": 0,
        "failed_runs": 0,
        "average_duration_ms": 0,
        "p95_duration_ms": 0,
        "last_run_at": "string",
        "previous": {
          "total_runs": 0,
          "completed_runs": 0,
          "failed_runs": 0,
          "average_duration_ms": 0,
          "p95_duration_ms": 0,
          "last_run_at": "string"
        }
      },
      "timeframe": {
        "from": "2026-01-01T00:00:00Z",
        "to": "2026-01-01T00:00:00Z",
        "timezone": "string",
        "granularity": "hour",
        "bucket_count": 0,
        "previous": {
          "from": "2026-01-01T00:00:00Z",
          "to": "2026-01-01T00:00:00Z",
          "timezone": "string",
          "granularity": "hour",
          "bucket_count": 0
        }
      },
      "series": [
        {
          "runs": 0,
          "completed_runs": 0,
          "failed_runs": 0,
          "bucket_start": "string",
          "groups": [
            {
              "runs": 0,
              "completed_runs": 0,
              "failed_runs": 0,
              "dimensions": {
                "project_id": "00000000-0000-0000-0000-000000000000"
              }
            }
          ]
        }
      ],
      "statuses": [
        {
          "status": "string",
          "count": 0
        }
      ],
      "models": [
        {
          "provider": "string",
          "model": "string",
          "count": 0
        }
      ],
      "tools": [
        {
          "name": "string",
          "count": 0
        }
      ],
      "projects": [
        {
          "project_id": "00000000-0000-0000-0000-000000000000",
          "project_name": "string",
          "project_slug": "string",
          "count": 0
        }
      ],
      "recent_runs": [
        {
          "id": "00000000-0000-0000-0000-000000000000",
          "run_id": "string",
          "status": "pending",
          "project_id": "00000000-0000-0000-0000-000000000000",
          "target": {
            "type": "agent",
            "agent_kind": "project",
            "name": "string",
            "id": "string"
          },
          "input": null,
          "output": null,
          "error": {
            "code": "string",
            "message": "string",
            "details": {}
          },
          "title": "string",
          "labels": {},
          "parent_run_id": "00000000-0000-0000-0000-000000000000",
          "root_run_id": "00000000-0000-0000-0000-000000000000",
          "created_at": "2026-01-01T00:00:00Z",
          "updated_at": "2026-01-01T00:00:00Z",
          "started_at": "2026-01-01T00:00:00Z",
          "finished_at": "2026-01-01T00:00:00Z",
          "config": {},
          "execution": {
            "id": "00000000-0000-0000-0000-000000000000",
            "runtime_instance": {
              "id": "00000000-0000-0000-0000-000000000000",
              "name": "string",
              "mode": "service"
            },
            "runtime": {
              "type": "main_branch"
            },
            "timeout_seconds": 1,
            "retry_limit": 0,
            "attempt": 1,
            "exit_code": 0,
            "duration_ms": 0,
            "tool_error_count": 0,
            "logs": "string",
            "start_mode": "string",
            "worker": {
              "id": "00000000-0000-0000-0000-000000000000",
              "name": "string",
              "worker_key": "string",
              "implementation_kind": "string",
              "claimed_at": "2026-01-01T00:00:00Z"
            }
          },
          "control": {
            "waiting": {
              "resume_at": "2026-01-01T00:00:00Z",
              "reason": "manual_pause"
            },
            "pause": {
              "requested_at": "2026-01-01T00:00:00Z"
            },
            "cancellation": {
              "requested_at": "2026-01-01T00:00:00Z",
              "stopped_at": "2026-01-01T00:00:00Z"
            }
          },
          "task_id": "string",
          "conversation_id": "00000000-0000-0000-0000-000000000000",
          "input_message_id": "00000000-0000-0000-0000-000000000000",
          "output_message_id": "00000000-0000-0000-0000-000000000000",
          "batch_id": "00000000-0000-0000-0000-000000000000",
          "trigger": {
            "type": "user",
            "id": "00000000-0000-0000-0000-000000000000"
          },
          "usage": {
            "funding": "managed",
            "tokens": {
              "input": 0,
              "output": 0,
              "cache": {
                "read": 0,
                "write": 0
              },
              "reasoning": 0,
              "total": 0
            },
            "cost": {
              "currency": "EUR",
              "status": "estimated",
              "provider": "string",
              "platform": "string",
              "total": "string",
              "credits": "string"
            },
            "model_calls": 0,
            "capture_status": "complete"
          },
          "descendants": {
            "total": 0,
            "active": 0,
            "has_failures": false,
            "usage": {
              "funding": "managed",
              "tokens": {
                "input": 0,
                "output": 0,
                "cache": {
                  "read": 0,
                  "write": 0
                },
                "reasoning": 0,
                "total": 0
              },
              "cost": {
                "currency": "EUR",
                "status": "estimated",
                "provider": "string",
                "platform": "string",
                "total": "string",
                "credits": "string"
              },
              "model_calls": 0,
              "capture_status": "complete"
            }
          },
          "artifacts": [
            {
              "artifact_id": "string",
              "type": "string",
              "media_type": "string",
              "size_bytes": 0,
              "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
              "href": "https://example.com"
            }
          ],
          "schemas": {
            "input": {
              "schema": false,
              "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
            },
            "output": {
              "schema": false,
              "sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
            }
          },
          "metadata": {}
        }
      ]
    }
  }
}
```
