Skip to main content
Query recent logs for the current project. Use this to debug SSR failures, build errors, runtime exceptions, and other issues. Supports filtering by level (error, warn, info) and free-text search. Use next_cursor from the response to paginate.

Tool details

FieldValue
Namesearch_project_logs
GroupLogs

Playground

Input schema

Input schema
{
  "type": "object",
  "properties": {
    "project_reference": {
      "type": "string",
      "description": "Project ID or slug"
    },
    "start": {
      "type": "string",
      "format": "date-time",
      "description": "Start time in ISO 8601 format. Defaults to 1 hour ago."
    },
    "end": {
      "type": "string",
      "format": "date-time",
      "description": "End time in ISO 8601 format. Defaults to now."
    },
    "cursor": {
      "type": "string",
      "description": "Pagination cursor from a previous response (next_cursor)."
    },
    "limit": {
      "type": "number",
      "minimum": 1,
      "maximum": 1000,
      "description": "Max log entries to return (default: 100, max: 1000).",
      "default": 100
    },
    "direction": {
      "type": "string",
      "enum": [
        "forward",
        "backward"
      ],
      "description": "Sort order (default: backward , newest first).",
      "default": "backward"
    },
    "level": {
      "type": "string",
      "enum": [
        "error",
        "warn",
        "info",
        "debug"
      ],
      "description": "Filter by log level."
    },
    "search": {
      "type": "string",
      "maxLength": 200,
      "description": "Free-text search within log messages."
    }
  },
  "required": [
    "project_reference"
  ],
  "additionalProperties": false,
  "description": "Input schema for the search_project_logs tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}

Output schema

Output schema
{
  "type": "object",
  "properties": {
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "timestamp": {
            "type": "string",
            "description": "The timestamp associated with this tool result."
          },
          "level": {
            "type": "string",
            "description": "The level associated with this tool result."
          },
          "message": {
            "type": "string",
            "description": "The message associated with this tool result."
          },
          "service": {
            "type": "string",
            "description": "The service associated with this tool result."
          },
          "trace_id": {
            "type": "string",
            "description": "The trace id associated with this tool result."
          },
          "request_id": {
            "type": "string",
            "description": "The request id associated with this tool result."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "description": "Additional structured values associated with this result."
            },
            "description": "Additional structured metadata returned by the tool."
          }
        },
        "required": [
          "timestamp",
          "level",
          "message",
          "service"
        ],
        "additionalProperties": false,
        "description": "One entry item associated with this tool result."
      },
      "description": "List of entries associated with this tool result."
    },
    "next_cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "The next cursor associated with this tool result."
    },
    "stats": {
      "type": "object",
      "properties": {
        "bytes_processed": {
          "type": "number",
          "description": "The bytes processed associated with this tool result."
        },
        "lines_processed": {
          "type": "number",
          "description": "The lines processed associated with this tool result."
        },
        "query_time_ms": {
          "type": "number",
          "description": "The query time ms associated with this tool result."
        }
      },
      "required": [
        "bytes_processed",
        "lines_processed",
        "query_time_ms"
      ],
      "additionalProperties": false,
      "description": "Structured stats details associated with this tool result."
    }
  },
  "required": [
    "entries",
    "next_cursor",
    "stats"
  ],
  "additionalProperties": false,
  "description": "Structured result returned by the search_project_logs tool.",
  "$schema": "http://json-schema.org/draft-07/schema#"
}