File size: 3,472 Bytes
cf3884b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
{
  "name": "get_runtime_logs",
  "description": "Get runtime logs for a project or deployment. Runtime logs show application output (console.log, errors, etc.) from serverless functions and edge functions during execution. Supports filtering by environment, log level, status code, source, time range, and full-text search. For wide time ranges, scope to a deploymentId for speed, or use group_by to get counts instead of individual lines. To investigate production errors specifically, prefer get_runtime_errors.",
  "inputSchema": {
    "type": "object",
    "properties": {
      "projectId": {
        "type": "string",
        "description": "The project ID to get runtime logs for."
      },
      "teamId": {
        "type": "string",
        "description": "The team ID to get the deployment events for. Alternatively the team slug can be used.\nTeam IDs start with \"team_\".\nIf you do not know the team ID or slug, it can be found through these mechanism:\n- Read the file .vercel/project.json if it exists and extract the orgId\n- Use the `list_teams` tool"
      },
      "deploymentId": {
        "type": "string",
        "description": "Filter logs to a specific deployment ID or URL."
      },
      "environment": {
        "type": "string",
        "enum": [
          "production",
          "preview"
        ],
        "description": "Filter by environment: \"production\" or \"preview\"."
      },
      "level": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "error",
            "warning",
            "info",
            "fatal"
          ]
        },
        "description": "Filter by log level(s). Can specify multiple levels."
      },
      "statusCode": {
        "type": "string",
        "description": "Filter by HTTP status code (e.g., \"500\", \"4xx\")."
      },
      "source": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "serverless",
            "edge-function",
            "edge-middleware",
            "static"
          ]
        },
        "description": "Filter by source type(s). Can specify multiple sources."
      },
      "since": {
        "type": "string",
        "description": "Start time - ISO format or relative time (e.g., \"1h\", \"30m\", \"7d\"). Defaults to 24 hours ago."
      },
      "until": {
        "type": "string",
        "description": "End time - ISO format or relative time. Defaults to now."
      },
      "limit": {
        "type": "number",
        "description": "Maximum number of log entries to return. Defaults to 50, max 100."
      },
      "query": {
        "type": "string",
        "description": "Full-text search query to filter logs."
      },
      "requestId": {
        "type": "string",
        "description": "Filter by specific request ID."
      },
      "group_by": {
        "type": "string",
        "enum": [
          "statusCode",
          "requestPath",
          "route",
          "level",
          "source",
          "deploymentId",
          "branch"
        ],
        "description": "Return counts grouped by this attribute instead of individual log lines. Use for \"how many errors\", \"status code breakdown\", \"top paths\". Fast even over wide time ranges."
      }
    },
    "required": [
      "projectId",
      "teamId"
    ],
    "additionalProperties": false,
    "$schema": "http://json-schema.org/draft-07/schema#"
  }
}