Skip to main content
Glama

debugger-status

Check JavaScript runtime debugger connectivity before debugging. Returns connection status with diagnostics and guidance when unreachable.

Instructions

Get JS runtime debugger connection status and diagnostic info. Use when you need to verify connectivity before using other debugger tools. Never fails when the runtime is simply unreachable — it returns a discriminated result instead:

  • { status: "connected", ... } with port, projectRoot (empty on Chromium and on legacy Metro, e.g. Vega), deviceName, appName, logicalDeviceId (absent on Vega), isNewDebugger (false on the legacy inspector), connected flag, loadedScripts count, and sourceMapReady (always true — waits for pending source maps before returning; no-op on Chromium).

  • { status: "not_connected", connected: false, reason, detail, guidance } (port omitted on Chromium) when Metro is not running (reason "metro_not_running"), no app is attached ("no_app_connected"), the device_id matches no target ("device_mismatch"), the CDP endpoint is unreachable or answered malformed ("cdp_unreachable"), the runtime accepted the connection but never answered ("runtime_unresponsive"), the cached connection went stale ("stale_connection"), or a reconnect is in flight ("reconnecting"). Follow the guidance field — do not retry in a loop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoMetro 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.
device_idYesDevice 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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
  2. 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."
  3. 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)."
  4. First observedv0.15.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure, and it does so thoroughly. It explains that the tool never fails on unreachable runtimes, enumerates all possible discriminated-result statuses and reasons, and documents important edge cases like Chromium port omission, source map waiting, and legacy Metro behavior.

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

Conciseness5/5

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

The description is long but every sentence earns its place, especially given the absence of an output schema. It is front-loaded with purpose and usage, then uses structured bullets to communicate a complex discriminated result without wasted words.

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?

Given only two parameters, no annotations, and no output schema, this description is unusually complete. It covers selection context, success and failure shapes, field semantics, failure reasons, platform-specific behavior, and follow-up guidance, so an agent has everything needed to call and interpret the tool correctly.

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?

The input schema already has 100% parameter coverage with detailed descriptions for both port and device_id, so the description is not required to compensate. The description adds no meaningful parameter semantics beyond what the schema already states, keeping this at the baseline of 3.

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?

The description states a specific verb and resource: 'Get JS runtime debugger connection status and diagnostic info.' It also distinguishes the tool from the broader debugger-tool family by framing it as a connectivity check to run before other debugger tools, which is enough for an agent to tell it apart from siblings like debugger-evaluate or debugger-connect.

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

Usage Guidelines4/5

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

It gives an explicit when-to-use instruction: verify connectivity before using other debugger tools, and adds operational guidance to follow the guidance field rather than retry in a loop. However, it does not name specific sibling alternatives or state when not to use it, so it falls just short of full alternative/exclusion guidance.

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