Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

Zephyr: Create Test Script

zephyr_create_test_script

Create a Plain Text or BDD test script for a Zephyr test case by providing its key and script text, enabling structured steps or Gherkin scenarios.

Instructions

Create a new Test Script of the types Plain Text or BDD in a Zephyr Test Case.

Toolset: Test Cases

Parameters:

  • testCaseKey (string) required: The key of the test case. Test case keys are of the format [A-Z]+-T[0-9]+

  • type (enum): Test scripts can be written in plain text or BDD format. The BDD type supports remote execution on a build system via API plugin.

Supported Keywords for BDD: Given, When, Then, And, But.

For more information about BDD and Gherkin syntax, see: https://support.smartbear.com/zephyr/docs/en/test-cases/gherkin-behavior-driven-development--bdd-.html

For Plain Text scripts, we support HTML fragments. To create a step-by-step test script, you should use the POST /testcases/{testCaseKey}/teststeps endpoint.

  • text (string)

Examples:

  1. Create a plain text test script for test case SA-T1 to verify that the axial pump can be enabled

{
  "testCaseKey": "SA-T1",
  "type": "plain",
  "text": "1. Navigate to Pump Settings</br>2. Enable Axial Pump</br>3. Verify pump status is 'Active'"
}

Expected Output: The created test script metadata including its id and self link

  1. Create a BDD test script for test case MM2-T15 to validate axial pump activation

{
  "testCaseKey": "MM2-T15",
  "type": "bdd",
  "text": "Given the axial pump is installed\nWhen the user enables the axial pump\nThen the pump status should be Active"
}

Expected Output: The created test script metadata including its id and self link

  1. Create a BDD test script for test case QA-T100 for axial pump performance validation

{
  "testCaseKey": "QA-T100",
  "type": "bdd",
  "text": "Given the system is running\nWhen the axial pump operates under load\nThen performance metrics should remain within thresholds"
}

Expected Output: The created test script metadata including its id and self link

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textNo
typeNoTest scripts can be written in plain text or BDD format. The BDD type supports remote execution on a build system via API plugin. Supported Keywords for BDD: Given, When, Then, And, But. For more information about BDD and Gherkin syntax, see: https://support.smartbear.com/zephyr/docs/en/test-cases/gherkin-behavior-driven-development--bdd-.html For Plain Text scripts, we support HTML fragments. To create a step-by-step test script, you should use the POST /testcases/{testCaseKey}/teststeps endpoint.
testCaseKeyYesThe key of the test case. Test case keys are of the format [A-Z]+-T[0-9]+

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
idNoThe ID of the entity
selfNo
Install Server

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already signal that this is not a read-only, idempotent, or destructive operation. The description adds useful behavioral context by explaining that BDD type supports remote execution via an API plugin, that Plain Text scripts support HTML fragments, and that the response includes metadata with id and self link. This goes beyond just repeating the annotation flags.

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 description is well-structured with parameters, type guidance, examples, and expected output. It is longer than strictly necessary, and the three examples are somewhat redundant, but each section earns its place by clarifying how to construct valid calls. The front-loaded purpose sentence helps an agent quickly identify the tool.

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 an output schema present, the description does not need to detail return values, but it still mentions the response metadata in the examples. It covers the main parameter semantics, type nuances, and alternatives for step creation. A minor gap is that text and type are not marked as required in the parameter list even though the examples always include them, which leaves slight ambiguity about whether they can be omitted.

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 description coverage is 67%, so the schema already documents testCaseKey and type thoroughly. The description adds value through concrete examples illustrating the text format for both plain and BDD scripts, plus the HTML fragment note for plain text. The text parameter itself remains somewhat underexplained, but the examples compensate reasonably well.

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: create a new Test Script in a Zephyr Test Case, and explicitly names the two supported types (Plain Text and BDD). It also distinguishes itself from a related operation by pointing to the POST /testcases/{testCaseKey}/teststeps endpoint for step-by-step test steps, which differentiates it from sibling tools like zephyr_create_test_case_steps.

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?

The description gives clear context for when to use this tool and, importantly, tells the agent to use the teststeps endpoint for step-by-step scripts instead. It does not explicitly name the sibling tool zephyr_create_test_case_steps, but the endpoint reference serves the same purpose. It could be more explicit about when to choose this over other Zephyr tools, but the guidance is sufficient.

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