Skip to content
Docs

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.

ParameterTypeRequiredDefaultDescription
projectIdstringYes-The project ID to get runtime logs for
teamIdstringYes-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.
deploymentIdstringNo-Filter logs to a specific deployment ID or URL
environmentstringNo-Filter by environment: production or preview
levelarrayNo-Filter by log level(s). Can specify multiple levels: error, warning, info, fatal
statusCodestringNo-Filter by HTTP status code (e.g., "500", "4xx")
sourcearrayNo-Filter by source type(s). Can specify multiple sources: serverless, edge-function, edge-middleware, static
sincestringNo24h agoStart of the window as an ISO date or relative lookback from now (e.g., 1h, 30m, or 7d)
untilstringNonowEnd of the window as an ISO date, relative lookback, or now. Omit this when the end should be the current time
limitnumberNo50Maximum number of log entries to return (max 1000)
querystringNo-Full-text search query to filter logs
requestIdstringNo-Filter by specific request ID
group_bystringNo-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?

supported.