Skip to main content
Glama

debugger-log-registry

Read-only

Summarize captured console logs from an app's JavaScript runtime to investigate warnings, errors, or unexpected output across React Native and Chromium.

Instructions

Get a summary of all console logs captured from the app's JS runtime, with the newest entries inline in { entries } (oldest first, messages cut to 300 characters). Returns the log file path, entry counts by level, and message clusters (grouped by similarity). Supports React Native and Chromium. Use when investigating warnings, errors, or unexpected output. Read { entries } first; Grep the returned file only for older lines or full messages, and never Read it whole: capture stops at 50,000 lines per session. Returns empty stats if no log data has been captured yet. Check { note }, which is present when { file } does not exist or holds fewer entries than totalEntries counts (failed writes, e.g. a full disk), or when the previous debugger session ended: torn down (its log file deleted) or cut off by an app crash (the note names its kept log file, if it had one). With a note about the previous session, the stats and { entries } hold only what the runtime replayed or logged since. Without a note, empty means the app has logged nothing. When the debugger cannot be reached, it returns { status: "not_connected", reason, detail, guidance } with NO log file. Follow the guidance (do not retry in a loop). Grep a log file in this state only when a { note } names one kept from before the app crashed. A "connected" result's stats may come from a session whose socket has since died. Use debugger-status, not this tool, to judge debugger health.

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": {
      "device_id": "<device_id>"
    },
    "name": "debugger-log-registry"
  }
}

Input Schema

NameRequiredDescriptionDefault
portNoMetro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. Range: 1 to 65535.
tailNoHow many of the newest entries to return in `entries`. Default 20. Range: 1 to 100.
levelsNoReturn only these levels in `entries`, e.g. ["warning", "error"]. Stats and clusters stay unfiltered.
device_idYesDevice id used with debugger-connect.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / device_id / description
      Previous value: -"Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id."New value: +"Device id used with debugger-connect."
    • addedInput schema / properties / levels
      Added value: +{
      +  "description": "Return only these levels in `entries`, e.g. [\"warning\", \"error\"]. Stats and clusters stay unfiltered.",
      +  "items": {
      +    "enum": [
      +      "log",
      +      "debug",
      +      "info",
      +      "error",
      +      "warning",
      +      "dir",
      +      "dirxml",
      +      "table",
      +      "trace",
      +      "clear",
      +      "startGroup",
      +      "startGroupCollapsed",
      +      "endGroup",
      +      "assert",
      +      "profile",
      +      "profileEnd",
      +      "count",
      +      "timeEnd"
      +    ],
      +    "type": "string"
      +  },
      +  "minItems": 1,
      +  "type": "array"
      +}
    • changedInput schema / properties / port / description
      Previous value: -"Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id."New value: +"Metro port. Omit it to use this device's port (8081 by default). Ignored for Chromium, whose CDP port is in device_id. Range: 1 to 65535."
    • addedInput schema / properties / tail
      Added value: +{
      +  "description": "How many of the newest entries to return in `entries`. Default 20. Range: 1 to 100.",
      +  "maximum": 100,
      +  "minimum": 1,
      +  "type": "integer"
      +}
  2. Changed5 schema fields changedv0.25.0
    • removedInput schema / properties / port / default
      Removed value: -8081
    • changedInput schema / properties / port / description
      Previous value: -"Metro server port (ignored for Chromium)"New value: +"Metro server port. Optional — omit it to use this device's port, 8081 by default. Ignored for Chromium, whose CDP port is encoded in device_id."
    • addedInput schema / properties / port / maximum
      Added value: +65535
    • addedInput schema / properties / port / minimum
      Added value: +1
    • changedInput schema / properties / port / type
      Previous value: -"number"New value: +"integer"
  3. Changed1 schema field changedv0.17.0
    • changedInput schema / properties / device_id / description
      Previous value: -"Device id from debugger-connect (iOS simulator UDID, Android logicalDeviceId, Vega serial, or Chromium device id)."New value: +"Device id from list-devices — the SAME id you passed to debugger-connect (iOS simulator UDID, Android serial, Vega serial, or Chromium device id). The logicalDeviceId debugger-connect returns also resolves here, but prefer the stable list-devices id."
  4. Changed1 schema field changedv0.16.0
    • changedInput schema / properties / device_id / description
      Previous value: -"Device id from debugger-connect (iOS simulator UDID, Android logicalDeviceId, or Chromium device id)."New value: +"Device id from debugger-connect (iOS simulator UDID, Android logicalDeviceId, Vega serial, or Chromium device id)."
  5. First observedv0.15.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare readOnlyHint=true, so the description carries the rest and does so richly: 300-character truncation, oldest-first ordering, a 50,000-line per-session capture cap, empty-stats semantics, the { note } conditions (failed writes, torn-down sessions, crash cutoffs), the not_connected response shape, and the stale-socket caveat for connected results. This is far beyond what the annotation supplies.

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 purpose is front-loaded and nearly every sentence carries behavioral payload, but the conditional note/not_connected clauses run together in a dense block that is hard to scan. Some restructuring would improve parseability without losing content.

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

Completeness5/5

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

With no output schema, the description fully defines the return shape: { entries }, { file }, { note }, counts by level, clusters, and the not_connected variant. It explains the two failure modes (no data captured vs previous session ended) that an agent must interpret, which is everything needed for correct invocation.

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

Parameters4/5

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

Schema coverage is 100%, so baseline is 3, but the description adds meaning by tying the newest entries in { entries } to the tail concept and clarifying that stats and clusters remain unfiltered. It does not elaborate on port or device_id beyond the schema, which is acceptable given full coverage.

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?

Opens with a specific verb and resource: 'Get a summary of all console logs captured from the app's JS runtime', then names the inline payload shape. It also differentiates from siblings by directing debugger-health questions to debugger-status. An agent can distinguish this from debugger-status and debugger-evaluate without opening a schema.

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 states when to use it ('investigating warnings, errors, or unexpected output'), the order of operations (read { entries } first, Grep the file only for older lines or full messages, never Read it whole), and the boundary with the alternative (use debugger-status, not this tool, to judge health). It also warns against retry loops when not connected.

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