Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

Reflect: Connect To Session

reflect_connect_to_session
Idempotent

Connect to an active Reflect recording session via WebSocket to enable interactive control, allowing you to create or edit tests by adding steps and segments directly.

Instructions

Connect to an active Reflect recording session via WebSocket to enable interactive control. When creating or editing a Reflect test using a connected recording session, follow these guidelines:

  1. After connecting to a session, get the list of segments for the session's platform type so you know what actions could be added via segments vs needing to create new steps. Do not list tests, only list segments.

  2. Before performing an action, take a screenshot to understand the current state of the application.

  3. Each add_prompt_step request should perform a single action or assertion. Do not combine multiple actions or assertions into a single step.

  4. Only perform one action at a time unless you're sure the action won't move the application to a different screen. For example, you can send multiple add_prompt_step requests to fill out individual form fields if those fields are visible on the current screen.

  5. Check the list of existing Segments to see if a Segment exists that achieves a similar goal to what you're trying to do next. If so, add the segment instead of creating new steps.

  6. If a step fails, use delete_previous_step to remove it and try a different approach.

  7. After completing a task, if the task required multiple prompt steps, add a final prompt step that validates the current state of the page based on what you see on the screen. In your validation, do not reference information that can change from run to run.

Toolset: Recording

Parameters:

  • sessionId (string) required: The ID of the Reflect recording session to connect to

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sessionIdYesThe ID of the Reflect recording session to connect to
Install Server

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already supply readOnlyHint=false, idempotentHint=true, destructiveHint=false, and the description adds context beyond them by revealing the WebSocket mechanism and the interactive control model. It also discloses behavioral expectations for the connected session, such as taking screenshots before actions and performing one add_prompt_step action at a time. It does not cover connection failure or lifecycle behavior, but the annotations lower the bar.

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 core purpose is front-loaded and the numbered workflow is easy to scan. There is redundancy between items 1 and 5 (both about checking segments) and items 3 and 4 (both about single actions), plus a duplicate of the schema's parameter description, so it is not perfectly concise.

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?

With only one parameter, no output schema, and annotations present, the description gives enough context to call and use the connected session: it names the prerequisite, identifies how to inspect available segments, and prescribes recovery and validation behavior. The main gap is the absence of any statement about connection result, errors, or how the connection is released, but this is not blocking for invocation.

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 coverage is 100% and the schema already documents sessionId as 'The ID of the Reflect recording session to connect to.' The description's Parameters section repeats this without adding format, provenance, or failure semantics, so the baseline of 3 is appropriate.

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 first sentence uses a specific verb ('Connect'), identifies the exact resource ('active Reflect recording session') and transport ('WebSocket'), and states the outcome ('enable interactive control'). This makes the tool clearly distinguishable from sibling reflect_* operations such as reflect_add_segment or reflect_get_screenshot.

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 states an explicit context: when creating or editing a Reflect test with a connected recording session. It also gives concrete operational rules (list segments, take screenshots, use delete_previous_step on failure, add a validation step), and even gives a 'do not list tests, only list segments' exclusion. It does not explicitly frame a when-not-to-use or alternative connection tool, so it falls just short of a 5.

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

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/SmartBear/smartbear-mcp'

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