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 key and version. Filter by step details, test data, or expected result, sort by sequence number, 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
Behavior5/5

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

Annotations indicate readOnlyHint=true, idempotentHint=true, destructiveHint=false, and the description reinforces this with 'Get' verb. It adds behavioral context like automatic key-to-ID resolution, pagination, filtering, sorting, and the structure of shareable steps, enhancing the agent's understanding beyond 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 well-structured with clear sections (Description, Parameters, Output, Use Cases, Examples, Hints) and front-loaded with core purpose. However, the Examples section is lengthy (7 examples with repetitive patterns) and the Hints section partially repeats parameter info, making it slightly less concise than optimal.

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?

Given the tool's complexity (6 parameters, nested filter object, output schema not provided), the description covers all aspects: use cases, examples, hints, output structure (total, startAt, maxResults, data array with step fields, shareable handling). It provides enough context for an agent to invoke the tool correctly without gaps.

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?

The input schema has 100% coverage with descriptions, but the description adds significant meaning: key format breakdown, how to obtain versionNo from search_test_cases, filter field details with substring match, default/max values for pagination, and examples for each parameter. This goes far beyond the schema.

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 'Get test steps for a test case by its key and version', specifying the verb (get), resource (test steps), and scope. It distinguishes from siblings by highlighting the human-readable key resolution and QTM4J context, while sibling names like 'qmetry_fetch_test_case_steps' and 'zephyr_get_test_case_steps' lack this specificity.

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

Usage Guidelines5/5

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

The description provides a 'Use Cases' section listing 7 specific scenarios (e.g., 'View all steps before executing', 'Review steps for a specific version'). The 'Hints' section explicitly states prerequisites ('set_project_context must be called before this tool') and advises using 'search_test_cases' to discover keys, offering clear when-to-use guidance and exclusions.

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

Install Server

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