Skip to main content
Glama

Parse user story

parse_user_story

Converts a user story, Gherkin scenarios, or acceptance criteria into structured test scenarios and a Playwright Test skeleton with one test per scenario and one test.step per step.

Instructions

Turn a user story (As a.../I want.../so that..., Gherkin scenarios, or acceptance-criteria bullets) into structured scenarios and a Playwright Test skeleton with one test per scenario and one test.step per step.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "story": "<story>"
    },
    "name": "parse_user_story"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoStart page, added as page.goto in beforeEach
storyYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.1

TDQS

A3.5/5.0
Behavior3/5

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

With no annotations, the description must carry the behavioral load, and it does disclose the output shape: one test per scenario and one test.step per step. It does not say whether the skeleton is written to disk or merely returned as text, nor where a file would land, which is the key behavioral ambiguity for an agent deciding whether to call this or write_test.

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?

A single front-loaded sentence that packs input formats and output contract with no filler. The nested parenthetical makes it dense but it remains parseable in one read.

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?

For a two-parameter generation tool with no output schema, the description should define the return value more concretely and state whether a file is produced. It covers input formats and test/step cardinality but leaves the delivery mechanism and the exact shape of 'structured scenarios' unexplained.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 50%: url is documented ('Start page, added as page.goto in beforeEach') but story is bare. The description compensates by spelling out exactly which story formats are acceptable, which is real meaning beyond the schema for the undocumented required parameter.

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?

States a specific verb and resource ('Turn a user story ... into structured scenarios and a Playwright Test skeleton') and even enumerates accepted input formats (As a/I want/so that, Gherkin, acceptance-criteria bullets). It does not distinguish itself from the related sibling write_test, so it stops short of a 5.

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 input formats imply when the tool applies (raw story text or Gherkin, before any test exists), but there is no explicit when-to-use statement, no exclusions, and no pointer to write_test or run_tests as the follow-on alternative. Usage is inferred rather than stated.

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