Skip to main content
Glama

expose_session

Create a read-only DAP mirror endpoint for a debug session so an IDE can attach as a second client and inspect live threads, stack, scopes, variables, and evaluate.

Instructions

Expose a debug session as a read-only DAP mirror endpoint on 127.0.0.1 so an IDE (e.g. VS Code) can attach as a second debug client and inspect live state: threads, stack, scopes, variables, evaluate. Returns host, port, and a session token the IDE must include as "mirrorToken" in its attach configuration. The mirror never drives execution — continue/step/pause and breakpoint changes are rejected; control stays with this MCP session. Requires an active session (launched or attached); works while running or paused. Calling it again returns the same endpoint. The endpoint closes on unexpose_session, close_debug_session, restart, or debuggee exit

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.25.1

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: read-only enforcement, idempotency ('calling it again returns the same endpoint'), token requirement, and the full closure lifecycle (unexpose_session, close_debug_session, restart, debuggee exit). This is unusually complete behavioral disclosure for a mutation-adjacent tool.

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?

It is longer than most descriptions but every sentence carries distinct information (capability, token, rejection semantics, lifecycle). The core purpose is front-loaded, though the density is high for a single-parameter tool.

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?

Even without an output schema, the description explains the return values (host, port, session token) and the attach configuration requirement, and it covers lifecycle and control restrictions. An agent has everything needed to invoke and reason about the result.

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?

There is one required sessionId parameter at 0% schema coverage, so the description must compensate. It implies an active session is needed and describes the returned token/host/port, but never states which session identifier to pass or how to obtain it, leaving the single parameter under-specified.

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 (Expose) and resource (a debug session) and defines the concrete output form: a read-only DAP mirror endpoint on 127.0.0.1. It clearly distinguishes itself from siblings like unexpose_session and close_debug_session by naming the lifecycle boundary.

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?

It states the exact use case (let an IDE attach as a second debug client), prerequisites (requires an active launched/attached session), and the when-not case (the mirror never drives execution; continue/step/pause and breakpoint changes are rejected). It also names the counterpart tool unexpose_session.

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