reflect_connect_to_session
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 ...
This record as markdown: /tools/smartbear-mcp/reflect-connect-to-session.md
What reflect_connect_to_session does on SmartBear MCP
AI agents invoke reflect_connect_to_session to trigger actions in SmartBear MCP. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.
| Parameter | Type | Required | Description |
|---|---|---|---|
sessionId | string | Yes | The ID of the Reflect recording session to connect to |
Parameters from the server's own tool schema.
Why reflect_connect_to_session is rated High
This tool establishes a WebSocket connection to a live recording session and enables interactive control of an application (screenshots, steps, actions, assertions). It triggers external operations whose effects depend on arguments — this is classic Execute category. Misuse could allow an AI agent to perform arbitrary UI actions on a live session, making it high severity.
From the tool's definition Connect to an active Reflect recording session via WebSocket to enable interactive control
Attacks that exploit this kind of access
The rule that runs reflect_connect_to_session safely
PolicyLayer is an MCP gateway: it sits between your AI agents and SmartBear MCP, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For reflect_connect_to_session, this is the rule to start with:
reflect_connect_to_session stays usable, but rate-capped: a runaway agent can't fire it dozens of times a minute. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect SmartBear MCP, apply this rule, and every reflect_connect_to_session call is checked against it from then on.
Questions about reflect_connect_to_session
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. Parameters: - sessionId (string) *required*: The ID of the Reflect recording session to connect to. It is categorised as a Execute tool in the SmartBear MCP MCP Server, which means it can trigger actions or run processes. Use rate limits and argument validation.
reflect_connect_to_session accepts 1 parameter: sessionId. Required: sessionId. The full parameter table on this page comes from the server's own tool schema.
Register the SmartBear MCP server in PolicyLayer and add a rule for reflect_connect_to_session: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches SmartBear MCP. Nothing to install.
reflect_connect_to_session is a Execute tool with high risk. Execute tools should be rate-limited and have argument validation enabled.
Yes. Add a rate_limit block to the reflect_connect_to_session rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for reflect_connect_to_session. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
reflect_connect_to_session is provided by the SmartBear MCP server (SmartBear/smartbear-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on SmartBear, and thousands of servers like it.
Across the catalogue