get_runtime_logs
Get runtime logs for a project or deployment. Runtime logs include application output such as console.log messages, errors, and other execution details from Vercel Functions during requests. You can filter logs by environment, log level, status code, source, time range, and full-text search. Use group_by to return counts instead of individual lines. For production errors, start with get_runtime_errors.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
projectId | string | Yes | - | The project ID to get runtime logs for |
teamId | string | Yes | - | The team ID to get runtime logs for. Alternatively the team slug can be used. Team IDs start with 'team_'. Can be found by reading .vercel/project.json (orgId) or using the list_teams tool. |
deploymentId | string | No | - | Filter logs to a specific deployment ID or URL |
environment | string | No | - | Filter by environment: production or preview |
level | array | No | - | Filter by log level(s). Can specify multiple levels: error, warning, info, fatal |
statusCode | string | No | - | Filter by HTTP status code (e.g., "500", "4xx") |
source | array | No | - | Filter by source type(s). Can specify multiple sources: serverless, edge-function, edge-middleware, static |
since | string | No | 24h ago | Start of the window as an ISO date or relative lookback from now (e.g., 1h, 30m, or 7d) |
until | string | No | now | End of the window as an ISO date, relative lookback, or now. Omit this when the end should be the current time |
limit | number | No | 50 | Maximum number of log entries to return (max 1000) |
query | string | No | - | Full-text search query to filter logs |
requestId | string | No | - | Filter by specific request ID |
group_by | string | No | - | Return counts grouped by statusCode, requestPath, route, level, source, deploymentId, or branch instead of individual log lines |
Sample prompt: "Show me the runtime error logs for my project from the last hour"
Was this helpful?