Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QTM4J: Search Linked Test Cases in Test Cycle

qtm4j_search_linked_test_cases_in_test_cycle
Read-onlyIdempotent

Search and filter test case executions linked to a test cycle. Use pagination, field selection, sorting, and rich filter criteria to find specific executions like failed or by status.

Instructions

Search and filter test case executions linked to a QTM4J test cycle. Supports pagination, field selection, sorting, and rich filter criteria.

Toolset: Test Cycles

Parameters:

  • cycleKey (string) required: Test Cycle key in '{PROJECT_KEY}-TR-{id}' format (e.g., 'SCRUM-TR-1'). Resolved to the internal cycle UID automatically.

  • fields (array): Fields to include in each result object. Allowed: id, key, summary, description, executionResult, status, priority, environment, tcWithDefects, estimatedTime, actualTime, createdOn, updatedOn, sprint, seqNo, latestTcExecutionId, customFields, flakyScore, passRateScore. Omit to return all fields.

  • maxResults (number): Maximum results per page (1-100). Default: 50. (default: 50)

  • sort (string): Sort pattern in 'field:asc|desc' format (e.g., 'key:desc'). Allowed sort fields: id, key, summary, description, executionResult, status, priority, environment, tcWithDefects, estimatedTime, actualTime, createdOn, updatedOn, sprint, flakyScore, passRateScore.

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

  • filter (object): Optional filter criteria to narrow down results. projectId is auto-filled from the active project context.

Output Description: JSON object with total (total matching executions), startAt, maxResults, and data (array of test case execution objects for this page).

Use Cases: 1. List all test cases linked to a test cycle 2. Find failed or blocked test case executions in a cycle 3. Search for test cases in a cycle by execution result (Pass, Fail, Blocked) 4. Filter test cases in a cycle by priority or status 5. Retrieve test cases assigned to a specific executor in a cycle 6. Get test cases with defects in a cycle 7. Paginate through large test cycle execution lists 8. Request only specific fields to reduce response size

Examples:

  1. List all test cases in a cycle

{
  "cycleKey": "SCRUM-TR-1"
}

Expected Output: Paginated list of test case executions in the cycle (first 50 results)

  1. Find failed test cases in a cycle

{
  "cycleKey": "SCRUM-TR-1",
  "filter": {
    "executionResult": [
      "Fail"
    ]
  },
  "fields": [
    "key",
    "summary",
    "executionResult",
    "priority"
  ]
}

Expected Output: Test case executions with Fail result

  1. Search with pagination and sort

{
  "cycleKey": "SCRUM-TR-5",
  "maxResults": 25,
  "startAt": 0,
  "sort": "key:asc",
  "filter": {
    "status": [
      "To Do"
    ]
  }
}

Expected Output: First 25 To Do test cases in the cycle sorted by key ascending

  1. Filter by execution assignee and environment

{
  "cycleKey": "SCRUM-TR-2",
  "filter": {
    "executionAssignee": [
      "5b10a2844c20165700ede21f"
    ],
    "environment": [
      "Staging"
    ]
  },
  "fields": [
    "key",
    "summary",
    "executionResult",
    "environment",
    "actualTime"
  ]
}

Expected Output: Test cases assigned to the specified user in the Staging environment

Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. CYCLE KEY FORMAT: '{PROJECT_KEY}-TR-{id}' — e.g. 'SCRUM-TR-1'. Resolved to internal UID automatically. 3. projectId in filter is auto-filled from the active project context — do not set it manually. 4. fields is sent as a query parameter; filter is sent in the request body. 5. Allowed fields: id, key, summary, description, executionResult, status, priority, environment, tcWithDefects, estimatedTime, actualTime, createdOn, updatedOn, sprint, seqNo, latestTcExecutionId, customFields, flakyScore, passRateScore. 6. Allowed sort fields: id, key, summary, description, executionResult, status, priority, environment, tcWithDefects, estimatedTime, actualTime, createdOn, updatedOn, sprint, flakyScore, passRateScore. 7. Date range format for filter fields: 'dd/mmm/yyyy,dd/mmm/yyyy' (e.g., '01/Jan/2024,31/Mar/2024'). 8. maxResults defaults to 50, maximum is 100. Use startAt to paginate. 9. executionResult filter accepts values like 'Pass', 'Fail', 'Blocked', 'Unexecuted'.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort pattern in 'field:asc|desc' format (e.g., 'key:desc'). Allowed sort fields: id, key, summary, description, executionResult, status, priority, environment, tcWithDefects, estimatedTime, actualTime, createdOn, updatedOn, sprint, flakyScore, passRateScore.
fieldsNoFields to include in each result object. Allowed: id, key, summary, description, executionResult, status, priority, environment, tcWithDefects, estimatedTime, actualTime, createdOn, updatedOn, sprint, seqNo, latestTcExecutionId, customFields, flakyScore, passRateScore. Omit to return all fields.
filterNoOptional filter criteria to narrow down results. projectId is auto-filled from the active project context.
startAtNoZero-indexed offset for pagination. Default: 0.
cycleKeyYesTest Cycle key in '{PROJECT_KEY}-TR-{id}' format (e.g., 'SCRUM-TR-1'). Resolved to the internal cycle UID automatically.
maxResultsNoMaximum results per page (1-100). Default: 50.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesTest case execution entries on this page.
totalYesTotal test case executions 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 already mark readOnlyHint=true, idempotentHint=true, destructiveHint=false. The description adds crucial behavioral context: auto-filling projectId, auto-resolution of cycleKey, pagination behavior (default 50, max 100), and how fields vs filter are sent (query vs body). No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is logically structured: purpose, parameters, output, use cases, examples, hints. No redundant sentences; each section adds unique value. Front-loaded with core action and toolset. Length is justified by depth of information.

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 existing), the description covers all aspects: prerequisite, parameter details, output shape, pagination, sorting, filtering, and multiple examples. It is self-contained for correct invocation.

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?

Schema coverage is 100% with inline descriptions for every parameter. The description significantly enhances semantics: explains cycleKey format with example, enumerates allowed field values, describes filter sub-fields, and notes that projectId is auto-filled. Examples further clarify parameter usage.

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 begins with a clear verb and resource: 'Search and filter test case executions linked to a QTM4J test cycle.' It is specific and distinguishes from sibling tools like qtm4j_link_test_cases_to_test_cycle or qtm4j_search_test_cases. The 'Toolset: Test Cycles' further contextualizes.

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 explicitly states the prerequisite 'set_project_context must be called before this tool' and provides a list of 8 specific use cases covering common scenarios like listing all, finding failed, filtering by priority/status/assignee. Hints reinforce correct usage, e.g., not to set projectId manually.

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