Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

Reflect: Create Segment

reflect_create_segment

Creates a reusable Reflect segment as an ordered list of test steps, enabling shared workflows to be referenced across tests without duplicating step definitions.

Instructions

Create a new Reflect segment which contains an ordered list of steps. Segments are reusable groups of steps that can be referenced from tests, and cannot reference other segments.

Toolset: Tests

Parameters:

  • name (string) required: Name of the segment to create.

  • type (enum) required: Platform of the segment.

  • description (string): Optional description of the segment.

  • deviceProfile (string): Device profile id. Required for a 'web' segment; ignored for 'api' and 'native-mobile'. One of: 'desktop', 'tablet', 'mobile'.

  • steps (array) required: Ordered list of steps that make up the segment. Segments cannot reference other segments. Prefer deterministic, selector-based steps ('click', 'input', 'submit', 'text-validation', 'hover', etc.) over AI-driven 'prompt' steps whenever a stable selector is available. Reserve 'prompt' steps for behavior that can't be expressed with a selector. Any text field in a step (e.g. 'inputText', 'url', 'expectedText', 'requestBody', header values, prompt text) may embed Reflect variable and function references using '${...}' syntax, which are resolved at run time: '${var(name)}' inserts the value of a parameter/variable named 'name' (declare parameters via the top-level 'parameters' field, or assign them mid-run with an 'update-parameters' step); '${sec(name)}' inserts the value of the account secret 'name'. Functions generate dynamic values: '${alphanum(n)}', '${alpha(n)}', '${num(n)}' (random alphanumeric / alphabetic / numeric string of length n), '${range(min, max)}' (random integer, inclusive), '${time(offsetMs)}' and '${datetime(offsetMs)}' (current epoch-millis / date-time, with an optional millisecond offset), and '${date(format, offsetDays)}' (current date formatted with tokens like 'MM/dd/yyyy', with an optional day offset).

  • parameters (array): Optional named parameters (variables) for the segment, each with a 'name' and optional default 'value'. Reference a parameter's value inside any step text field with '${var(name)}'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the segment to create.
typeYesPlatform of the segment.
stepsYesOrdered list of steps that make up the segment. Segments cannot reference other segments. Prefer deterministic, selector-based steps ('click', 'input', 'submit', 'text-validation', 'hover', etc.) over AI-driven 'prompt' steps whenever a stable selector is available. Reserve 'prompt' steps for behavior that can't be expressed with a selector. Any text field in a step (e.g. 'inputText', 'url', 'expectedText', 'requestBody', header values, prompt text) may embed Reflect variable and function references using '${...}' syntax, which are resolved at run time: '${var(name)}' inserts the value of a parameter/variable named 'name' (declare parameters via the top-level 'parameters' field, or assign them mid-run with an 'update-parameters' step); '${sec(name)}' inserts the value of the account secret 'name'. Functions generate dynamic values: '${alphanum(n)}', '${alpha(n)}', '${num(n)}' (random alphanumeric / alphabetic / numeric string of length n), '${range(min, max)}' (random integer, inclusive), '${time(offsetMs)}' and '${datetime(offsetMs)}' (current epoch-millis / date-time, with an optional millisecond offset), and '${date(format, offsetDays)}' (current date formatted with tokens like 'MM/dd/yyyy', with an optional day offset).
parametersNoOptional named parameters (variables) for the segment, each with a 'name' and optional default 'value'. Reference a parameter's value inside any step text field with '${var(name)}'.
descriptionNoOptional description of the segment.
deviceProfileNoDevice profile id. Required for a 'web' segment; ignored for 'api' and 'native-mobile'. One of: 'desktop', 'tablet', 'mobile'.
Install Server

TDQS

A3.5/5.0
Behavior4/5

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

Beyond the annotations, the description discloses meaningful behaviors: segments cannot reference other segments, deviceProfile is required for 'web' and ignored for other platform types, and the ${...} variable/function resolution syntax is fully explained. It also provides guidance on preferring selector-based steps over AI prompt steps. No contradiction with annotations was found.

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

Conciseness2/5

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

The opening sentences are concise and useful, but the description then duplicates nearly all of the input schema's parameter documentation, including the large 'steps' sub-schema. Since the schema already carries this information, the description is significantly longer than it needs to be.

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?

Together with the very rich input schema, the description covers all six parameters, required fields, platform-specific behavior, step type guidance, and template syntax. There is no output schema, and while explicit success/error behavior is not described, the information needed to invoke the tool correctly is present.

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 description coverage is 100%, so the schema already documents every parameter thoroughly. The description largely repeats the schema's parameter text rather than adding new semantic value, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action and resource: 'Create a new Reflect segment' with an ordered list of steps, and explains what segments are for. However, it does not explicitly distinguish itself from the sibling reflect_add_segment, so a 5 for sibling differentiation is not warranted.

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

Usage Guidelines3/5

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

The description gives useful context — segments are reusable groups of steps referenced from tests and cannot reference other segments — which implies when this tool is relevant. It does not state explicit when/when-not conditions or name alternatives, so the usage guidance remains implied rather than explicit.

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