Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QTM4J: Get Test Steps

qtm4j_get_test_steps
Read-onlyIdempotent

Retrieve test steps for a test case by its key. Filter by version, action text, test data, or expected result, sort by sequence, and paginate results.

Instructions

Get test steps for a test case by its key and version. Accepts the human-readable key (e.g. 'SCRUM-TC-145') and resolves it to the internal ID automatically.

Toolset: Test Cases

Parameters:

  • key (string) required: Test case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'. PROJECT_KEY is the Jira project key (e.g. 'SCRUM'). The number is the test case counter within that project (auto-incremented, not related to seqNo). Obtain keys from the search_test_cases tool or directly from QTM4J.

  • versionNo (number): Test case version number. Defaults to the latest version if omitted. Obtain from search_test_cases response field: version.versionNo

  • filter (object): Text filters for test steps — each field performs a substring match. Multiple fields are combined with AND.

  • startAt (number): Zero-indexed offset for pagination (URL query param). Default: 0. (default: 0)

  • maxResults (number): Number of steps per page (URL query param). Default: 50. Maximum: 100. (default: 50)

  • sort (string): Sort pattern (URL query param). Format: 'fieldName:order'. Sortable fields: stepDetails, testData, seqNo, expectedResult. Order values: 'asc' or 'desc'. Example: 'seqNo:asc'

Output Description: JSON object with total (total matching steps), startAt, maxResults, and data (array of step objects). Each step has: id, seqNo, stepDetails, testData, expectedResult, attachmentCount. Shared steps also have a 'shareable' object containing shareableTestcaseUID and shareableTestSteps array.

Use Cases: 1. View all steps of a test case before executing it 2. Review steps for a specific test case version 3. Filter steps by action text, test data, or expected result 4. Get steps for a test case found via search_test_cases 5. Inspect shared (reusable) steps embedded in a test case 6. Sort steps by sequence number to view them in execution order 7. Paginate through test cases that have a large number of steps

Examples:

  1. Get all steps for a test case (latest version)

{
  "key": "SCRUM-TC-145"
}

Expected Output: All steps for SCRUM-TC-145 with stepDetails, testData, expectedResult, and any shared step blocks

  1. Get steps for a specific version

{
  "key": "SCRUM-TC-145",
  "versionNo": 2
}

Expected Output: Steps for version 2 of SCRUM-TC-145

  1. Get steps in execution order

{
  "key": "SCRUM-TC-85",
  "sort": "seqNo:asc"
}

Expected Output: All steps sorted by sequence number ascending

  1. Filter steps by action text

{
  "key": "SCRUM-TC-32",
  "filter": {
    "stepDetails": "Open the application"
  }
}

Expected Output: Steps whose stepDetails contain 'Open the application'

  1. Filter steps by expected result

{
  "key": "SCRUM-TC-65",
  "filter": {
    "expectedResult": "logged in successfully"
  }
}

Expected Output: Steps whose expectedResult contains 'logged in successfully'

  1. Filter steps by test data

{
  "key": "SCRUM-TC-125",
  "filter": {
    "testData": "Username: user1"
  }
}

Expected Output: Steps with testData containing 'Username: user1'

  1. Paginate through many steps

{
  "key": "SCRUM-TC-105",
  "startAt": 0,
  "maxResults": 10,
  "sort": "seqNo:asc"
}

Expected Output: First 10 steps in sequence order

Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. KEY FORMAT: '{PROJECT_KEY}-TC-{number}' — e.g. 'SCRUM-TC-145'. PROJECT_KEY is the Jira project key; the number is the test case counter within that project (auto-incremented, not the same as seqNo). 3. VERSION: versionNo defaults to the latest version. Get the version number from search_test_cases response: version.versionNo. 4. Use search_test_cases to discover test case keys before calling this tool. 5. SHAREABLE STEPS: Steps with a non-null 'shareable' field are references to shared/reusable test cases. The 'shareable.shareableTestSteps' array contains the embedded sub-steps with decimal seqNo values (e.g. '1.1', '1.2'). 6. FILTER: Each filter field is a substring match (case-insensitive). Multiple fields combine with AND. 7. SORT: 'seqNo:asc' shows steps in their natural execution order. Allowed sort fields: stepDetails, testData, seqNo, expectedResult. 8. PAGINATION: startAt and maxResults are URL query params. Default page size is 50, maximum is 100.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyYesTest case key in the format '{PROJECT_KEY}-TC-{number}', e.g. 'SCRUM-TC-145'. PROJECT_KEY is the Jira project key (e.g. 'SCRUM'). The number is the test case counter within that project (auto-incremented, not related to seqNo). Obtain keys from the search_test_cases tool or directly from QTM4J.
sortNoSort pattern (URL query param). Format: 'fieldName:order'. Sortable fields: stepDetails, testData, seqNo, expectedResult. Order values: 'asc' or 'desc'. Example: 'seqNo:asc'
filterNoText filters for test steps — each field performs a substring match. Multiple fields are combined with AND.
startAtNoZero-indexed offset for pagination (URL query param). Default: 0.
versionNoNoTest case version number. Defaults to the latest version if omitted. Obtain from search_test_cases response field: version.versionNo
maxResultsNoNumber of steps per page (URL query param). Default: 50. Maximum: 100.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesTest steps on this page
totalYesTotal steps matching the filter (across all pages)
startAtYesOffset of this page
maxResultsYesPage size used for this response
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint/destructiveHint annotations, the description discloses meaningful behavior: key auto-resolution to internal ID, default-to-latest version, substring case-insensitive filters combined with AND, pagination defaults (50/100), and shared-step representation with decimal seqNo values. This gives the agent accurate expectations without contradicting the annotations.

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 front-loaded with the core purpose and organized into Parameters, Output Description, Use Cases, Examples, and Hints. It is verbose and repeats key-format, filter, and sort details across sections, but the structured format keeps it navigable for an agent.

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

Completeness5/5

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

The tool is complex (nested filter object, versioning, pagination, sorting, shared steps), and the description covers all of it, including a required project-context prerequisite, key discovery via search_test_cases, and output semantics. An agent can invoke this tool correctly with the information provided, and the presence of an output schema further reduces missing context.

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

Parameters5/5

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

Although schema coverage is 100%, the description goes well beyond the schema: it explains the '{PROJECT_KEY}-TC-{number}' key format with examples, clarifies filter substring and AND behavior, details the 'fieldName:order' sort syntax with allowed fields, and documents the output shape (total, startAt, maxResults, data, shareable). This substantially increases parameter understanding.

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 opens with a specific verb and resource: 'Get test steps for a test case by its key and version.' It clearly describes the function and key format, but it does not explicitly differentiate itself from sibling tools that also retrieve test steps from other providers (e.g., zephyr_get_test_case_steps, qmetry_fetch_test_case_steps), so it stops short of full differentiation.

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 provides a clear 'Use Cases' list and workflow hints, including the prerequisite 'set_project_context must be called before this tool' and 'Use search_test_cases to discover test case keys before calling this tool.' It does not explicitly mention when not to use the tool or name alternative step-retrieval tools, but the context is strong.

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