Skip to main content
Glama

debugger-connect

Connect to a JS runtime CDP debugger on iOS, Android, or Chromium. Returns connection info needed for subsequent debugger commands.

Instructions

Connect to a JS runtime CDP debugger. iOS / Android: connects to Metro's CDP endpoint on the given port. Chromium: re-uses the page CDP session opened by boot-device — port is ignored. Returns connection info including port, projectRoot (empty on Chromium), deviceName, appName, logicalDeviceId, and isNewDebugger. If already connected, returns the existing connection. Use when starting a debug session or before calling other debugger-* tools. Fails if the runtime is unreachable (Metro down, or Chromium CDP terminated).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
portNoMetro server port (ignored for Chromium — its CDP port is encoded in device_id)
device_idYesDevice id: iOS simulator UDID, Android logicalDeviceId returned by Metro, or Chromium device id (chromium-cdp-<port>) from list-devices. The returned logicalDeviceId must be forwarded as device_id to all subsequent debugger-* calls to pin them to this device.
Behavior5/5

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

With no annotations, the description carries full burden for behavioral transparency. It discloses side effects (returns existing connection if already connected), platform-specific behavior, return fields (port, projectRoot, deviceName, etc.), and error conditions. This is comprehensive and provides all necessary behavioral context.

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 appropriately sized—four sentences covering purpose, platform differences, return info, and usage context. It is front-loaded with the core action, and every sentence adds distinct value. No 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 no output schema, the description adequately describes return values and structure. It covers prerequisites (debugger session, Metro reachable), platform variants, error scenarios, and relationship to sibling tools. Everything an agent needs is present.

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

Parameters5/5

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

Schema coverage is 100%, but the description adds significant value beyond the schema: it clarifies that 'port' is ignored for Chromium and that 'device_id' must be forwarded to subsequent debugger-* calls to pin the device. This extra context ensures correct parameter usage across platforms.

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 clearly states the tool's purpose: connect to a JS runtime CDP debugger. It distinguishes between iOS/Android (connects to Metro) and Chromium (reuses existing CDP session), and explicitly positions it relative to sibling tools: 'Use when starting a debug session or before calling other debugger-* tools.' This makes the purpose unambiguous and differentiated.

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?

The description explicitly states when to use the tool ('Use when starting a debug session or before calling other debugger-* tools') and lists failure conditions ('Fails if the runtime is unreachable'). It also explains platform-specific behavior (port ignored for Chromium). It does not explicitly state when not to use it, but the context is clear enough for an agent to decide.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/software-mansion/argent'

If you have feedback or need assistance with the MCP directory API, please join our Discord server