view_logs
View function execution logs with filtering by function name, route, status code, severity, time range, full-text search, or request ID. Debug production issues by applying filters like level='error' with a relative time range.
Instructions
View function execution logs with rich filtering. Each entry includes status_code, duration_ms, log_output (captured console.log), error (if any), and a derived level field (error/warning/info).
Filter by any combination of function_name, route, method, status_code (exact or 4xx/5xx wildcards), level, time range (since/until — ISO or relative like '1h'/'30m'/'7d'), full-text query across log_output and error, or specific request_id.
Use this to debug production issues: e.g. level='error' + since='1h' finds everything that blew up in the last hour.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | Project ID | |
| function_name | No | Filter by function name | |
| route | No | Filter by exact request path (e.g. /api/users) | |
| method | No | Filter by HTTP method | |
| status_code | No | Exact code ('500') or wildcard ('4xx', '5xx') | |
| level | No | Filter by severity: 'error', 'warning', or 'info' | |
| since | No | Start time — ISO 8601 or relative ('1h', '30m', '7d') | |
| until | No | End time — ISO 8601 or relative | |
| query | No | Full-text search across log_output and error | |
| request_id | No | Filter to a single request | |
| limit | No | Max entries (default 50, max 1000) |