Skip to main content
Glama

Get Logs

get_logs
Read-only

Call FIRST when debugging a runtime problem (a 500, a failed request, a blank page, 'it doesn't work'), before theorizing. Sources:

  • 'server' (default): the dev backend's request logs, last hour (method, URL, status, duration, log lines), background jobs included; log_reference_id: one request in full.

  • 'browser': console output and client network requests (⇄ METHOD url → status, error body of failed ones: CORS, timeouts, third-party calls) from the user's open editor (~1 hour; empty if none); a line's ref=<id> is a 'server' log_reference_id.

  • 'background': background work in the preview and the published app: schedules and next run, runs in progress, runs long or cut off at the 15-minute limit in 7 days ('still running?', 'timed out?').

  • 'published': the PUBLISHED app's backend logs (kept 90 days), oldest first, last hour by default; from/to (ISO 8601), filter (literal substring), limit (default 200), cursor (get_guides('prod-backend-logs')).

  • 'push': push sends, newest first, per device, delivered or not; from/to, subscription (one device's endpoint), cursor.

  • 'email': the test inbox: mail kept unsent (branch with Send email off; preview sends to test addresses like qa+1@example.com) and other preview sends, as text with links (sign-in codes, reset links).

  • 'events': project events this app received or sent (onProjectEvent deliveries and their attempts).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "projectId": "<projectId>"
    },
    "name": "get_logs"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNo
fromNo
limitNo
cursorNo
filterNo
sourceNo
projectIdYes
subscriptionNo
log_reference_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / source / enum
      Previous value: -[
      -  "server",
      -  "browser",
      -  "background",
      -  "published",
      -  "push",
      -  "email"
      -]New value: +[
      +  "server",
      +  "browser",
      +  "background",
      +  "published",
      +  "push",
      +  "email",
      +  "events"
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / source / enum
      Previous value: -[
      -  "server",
      -  "browser",
      -  "background",
      -  "published",
      -  "push"
      -]New value: +[
      +  "server",
      +  "browser",
      +  "background",
      +  "published",
      +  "push",
      +  "email"
      +]
  3. Changed7 schema fields changed
    • addedInput schema / properties / cursor
      Added value: +{
      +  "maxLength": 4000,
      +  "type": "string"
      +}
    • addedInput schema / properties / filter
      Added value: +{
      +  "maxLength": 500,
      +  "type": "string"
      +}
    • addedInput schema / properties / from
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / limit / maximum
      Previous value: -50New value: +1000
    • changedInput schema / properties / source / enum
      Previous value: -[
      -  "server",
      -  "browser",
      -  "background"
      -]New value: +[
      +  "server",
      +  "browser",
      +  "background",
      +  "published",
      +  "push"
      +]
    • addedInput schema / properties / subscription
      Added value: +{
      +  "maxLength": 2000,
      +  "type": "string"
      +}
    • addedInput schema / properties / to
      Added value: +{
      +  "type": "string"
      +}
  4. Changed1 schema field changed
    • changedInput schema / properties / source / enum
      Previous value: -[
      -  "server",
      -  "browser"
      -]New value: +[
      +  "server",
      +  "browser",
      +  "background"
      +]
  5. First observed

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already establish readOnlyHint=true, destructiveHint=false and openWorldHint=false, so safety is covered. The description nonetheless adds substantial non-annotation context: retention windows (last hour, 7 days, 90 days), default ordering per source (oldest first for published, newest first for push), default limit 200, cursor semantics, and the 'empty if none' behavior for browser logs. It stops short of describing pagination loop mechanics or log line format in detail.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The critical directive ('Call FIRST when debugging ... before theorizing') is front-loaded, followed by a structured per-source bulleted breakdown that is easy to scan. It is long, but each bullet carries source-specific retention, ordering, or field details that would otherwise be missing; minor verbosity comes from stacked parenthetical examples.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 9-parameter multi-source log tool with no output schema, the description supplies the source taxonomy, time-range formats, retention behavior, and cross-source linking (browser ref=<id> matching a server log_reference_id). What remains thin is the shape of returned records per source and pagination/termination behavior, which matters given the cursor parameters.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 9 parameters, but the description compensates well, documenting source enum semantics, from/to as ISO 8601, filter as a literal substring, limit default 200, cursor pointing at get_guides('prod-backend-logs'), subscription as one device's endpoint, and log_reference_id as 'one request in full'. The required projectId parameter is never explained in the description, which is the main remaining gap for a 0%-coverage schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Get Logs') and enumerates seven distinct sources with what each one returns, so an agent can tell exactly which log surface it is reading. It is also clearly distinguished from siblings like get_analytics or get_job_status by being the debugging-first log retrieval tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly says 'Call FIRST when debugging a runtime problem (a 500, a failed request, a blank page, ...) before theorizing', which is an unambiguous when-to-use trigger. It then gives per-source selection conditions (server for backend request logs, browser for console/network, background for scheduled/run work, published for the 90-day prod backend, push for delivery per device, email for the test inbox, events for onProjectEvent), leaving essentially nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources