Skip to main content
Glama
Yan-Vi
by Yan-Vi

add_step

Add a step to an Easy Spec flow at the end, or insert into a nested Conditional/Repeat/Iterate body with parentPath. Provide flowId and step object to extend your test automation flow.

Instructions

Add a step to a flow, at the end by default. Use parentPath to insert into a Conditional/Repeat/Iterate step's own nested body.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
atNo
stepYesA step object: { kind, method, selector?, pageObjectName?, pageObjectMethod?, pageObjectArgs?, elementAlias?, scopeName?, scopeSelector?, args?, options?, negate?, variable?, raw?, condition?, init?, update?, steps?, iterableName?, itemVarName? } -- same shape as a flow.json step; see get_flow on an existing flow for real examples of each kind. `selector`/`scopeSelector` are Playwright locator-chain EXPRESSIONS (see get_page_object's own description), not bare selector-engine strings -- e.g. "getByRole('button', { name: 'Submit' })", spliced as page.<selector> (or <scope>.<selector> when scoped) in generated code. scopeName/scopeSelector only apply to a step NOT bound to a page-object method (a page-object-bound step's scope comes from that method's own scope assignment instead -- see set_method_scope): scopeSelector defines a new flow-local scope (reused by any later step in this SAME flow that sets just scopeName to the same value); a step with only scopeName reuses whichever earlier step in this flow first defined that name. `kind: "raw"` is ONLY for genuinely inline, unnamed code (the `raw` field, its own JS/TS statement(s)). Calling a shared, project-wide Util function instead (see create_util/set_util_body/set_util_params/set_util_group_name) is NOT a `raw` step at all -- the step's own `kind` IS the util's current group name (every util always belongs to a group, defaulting to "custom-utils"; see list_util_groups), and `method` names which function within it, exactly like kind:"context"+method:"clearCookies" -- e.g. { kind: "custom-utils", method: "connectDb", args?, variable? }. Look up a util's current groupName via get_util/list_utils before authoring a step that calls it.
flowIdYes
projectNoPath to the project root (same folder the side panel connects to). Defaults to the EASYSPEC_PROJECT environment variable if omitted.
parentPathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.4

TDQS

A3.6/5.0
Behavior3/5

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

The description discloses the default append behavior and nested insertion via parentPath, but with no annotations it leaves side effects, validation, ordering behavior with the 'at' parameter, and failure modes undocumented.

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 top-level description is short and front-loaded with the core action. The step parameter's embedded documentation is dense and long, but it carries relevant authoring detail for a complex nested object.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main use case and nested insertion, but it omits key context such as how the 'at' index behaves, what parentPath should look like, and what the tool returns or does on invalid input. These gaps matter for correct 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?

The step parameter is described in considerable detail and project has a helpful default note, but flowId, at, and parentPath lack direct schema-level explanations. The intended format and semantics of at and parentPath are only partially inferable.

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 action ('Add a step to a flow') and the primary resource. It also distinguishes the single-step insertion behavior from sibling tools like add_multiple_steps and update_step.

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?

It gives one useful usage hint about parentPath for nested bodies, but it does not explicitly explain when to choose add_step over add_multiple_steps or update_step. This is a notable gap given the sibling toolset.

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