Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QTM4J: Search Test Cycles

qtm4j_search_test_cycles
Read-onlyIdempotent

Search for test cycles in QTM4J projects by status, owner, folder, date range, or keyword. Filter, sort, paginate, and select fields to get the matching cycles.

Instructions

Search for test cycles in a QTM4J project by status, owner, folder, date range, or keyword. projectId is injected automatically from the active project context.

Toolset: Test Cycles

Parameters:

  • filter (object): Filter criteria — multiple fields are combined with AND; multiple values within one field use OR.

  • fields (array): Fields to include in each result object. If omitted, server returns its default set (NOTE: plannedStartDate and plannedEndDate are NOT in the default response — include them explicitly when needed). Available fields: key, summary, description, status, priority, assignee, reporter, isAutomated, plannedStartDate, plannedEndDate, labels, components, fixVersions, sprint, defectCount, estimatedTime, actualTime, created, updated. Example: ['key', 'summary', 'status', 'assignee', 'plannedStartDate', 'plannedEndDate']

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

  • maxResults (number): Number of results per page (URL query param). Default: 20. Maximum: 100. To page through results, increment startAt by 20 until startAt >= total. (default: 20)

  • sort (string): Sort pattern sent as a URL query param. Format: 'fieldName:order'. Default: 'key:asc'. Order values: 'asc' (lowest/oldest first) or 'desc' (highest/newest first). Sortable fields: key, summary, status, plannedStartDate, plannedEndDate, defectCount. Examples: 'key:asc', 'plannedStartDate:desc' (default: "key:asc")

Output Description: JSON object with total (matching cycles across all pages), startAt, maxResults, and data (array of test cycle objects for this page). Each item always has id and key. Other fields depend on what was requested via the fields parameter.

Use Cases: 1. Find test cycles by status, priority, assignee, reporter, or folder 2. Find test cycles by planned execution date range (plannedStartDate / plannedEndDate) 3. Find test cycles created or updated within a date range (createdOn / updatedOn) 4. Search test cycles by keyword across key, summary, and description 5. Paginate, sort, and select specific response fields

Examples:

  1. Find all in-progress and to-do cycles

{
  "filter": {
    "status": [
      "In Progress",
      "To Do"
    ]
  }
}

Expected Output: Paginated list of matching test cycles

  1. Find cycles owned by a specific user

{
  "filter": {
    "assignee": [
      "5b10a2844c20165700ede21f"
    ]
  }
}

Expected Output: Test cycles assigned to that user

  1. Find cycles with planned start date in a range, requesting date fields explicitly

{
  "filter": {
    "plannedStartDate": "01/Apr/2026,30/Apr/2026"
  },
  "fields": [
    "key",
    "summary",
    "status",
    "assignee",
    "plannedStartDate",
    "plannedEndDate"
  ]
}

Expected Output: Cycles with planned start date in April 2026 including date fields

  1. Keyword search with sort, pagination, and selected fields

{
  "filter": {
    "searchText": "regression"
  },
  "fields": [
    "key",
    "summary",
    "status",
    "assignee"
  ],
  "sort": "plannedStartDate:asc",
  "startAt": 0,
  "maxResults": 25
}

Expected Output: Cycles matching 'regression', sorted by planned start date

  1. Find cycles created last week

{
  "filter": {
    "createdOn": "01/May/2026,07/May/2026"
  },
  "fields": [
    "key",
    "summary",
    "status",
    "assignee"
  ],
  "sort": "key:asc"
}

Expected Output: Test cycles created between 01 May and 07 May 2026

  1. Find high-priority cycles updated recently by reporter

{
  "filter": {
    "priority": [
      "High"
    ],
    "reporter": [
      "5b10a2844c20165700ede21f"
    ],
    "updatedOn": "01/May/2026,21/May/2026"
  },
  "fields": [
    "key",
    "summary",
    "status",
    "priority",
    "assignee"
  ]
}

Expected Output: High-priority cycles updated in May 2026 reported by that user

  1. All filters combined with explicit field selection

{
  "filter": {
    "status": [
      "In Progress"
    ],
    "priority": [
      "High",
      "Medium"
    ],
    "assignee": [
      "5b10a2844c20165700ede21f"
    ],
    "folderId": 109987,
    "plannedStartDate": "02/Apr/2026,15/May/2026",
    "searchText": "regression"
  },
  "fields": [
    "key",
    "summary",
    "status",
    "priority",
    "assignee",
    "plannedStartDate"
  ],
  "sort": "plannedStartDate:asc",
  "maxResults": 25
}

Expected Output: Test cycles matching all specified filters with selected fields

Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. SUPPORTED FILTER FIELDS: status, priority, assignee, reporter, folderId, labels, components, plannedStartDate, plannedEndDate, searchText, createdOn, updatedOn, isAutomated, aiGenerated. Do NOT use any other filter field names. 3. DATE FILTERS: createdOn = creation date; updatedOn = last-updated date; plannedStartDate / plannedEndDate = planned execution window. Format: 'dd/MMM/yyyy,dd/MMM/yyyy' e.g. '01/May/2026,21/May/2026'. Month is case-sensitive. 'Created last week' → createdOn, NOT plannedStartDate. 4. FIELDS: Pass as an array to select what to return. plannedStartDate and plannedEndDate are NOT in the default response — include them explicitly. Available: key, summary, description, status, priority, assignee, reporter, isAutomated, plannedStartDate, plannedEndDate, labels, components, fixVersions, sprint, defectCount, estimatedTime, actualTime, created, updated. 5. REQUEST STRUCTURE: filter → request body; fields, sort, startAt, maxResults → URL query params. 6. SORT: Allowed fields: key, summary, status, plannedStartDate, plannedEndDate, defectCount. Format: 'fieldName:asc' or 'fieldName:desc' e.g. 'plannedStartDate:asc'. 7. FOLDER ID: folderId in fields.testCycle and fields.testCase is a numeric ID. Tell the user they can get it by right-clicking the target folder in QTM4J and selecting 'Copy Folder Id'. Always ask the user for the numeric ID directly — never try to look it up.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort pattern sent as a URL query param. Format: 'fieldName:order'. Default: 'key:asc'. Order values: 'asc' (lowest/oldest first) or 'desc' (highest/newest first). Sortable fields: key, summary, status, plannedStartDate, plannedEndDate, defectCount. Examples: 'key:asc', 'plannedStartDate:desc'key:asc
fieldsNoFields to include in each result object. If omitted, server returns its default set (NOTE: plannedStartDate and plannedEndDate are NOT in the default response — include them explicitly when needed). Available fields: key, summary, description, status, priority, assignee, reporter, isAutomated, plannedStartDate, plannedEndDate, labels, components, fixVersions, sprint, defectCount, estimatedTime, actualTime, created, updated. Example: ['key', 'summary', 'status', 'assignee', 'plannedStartDate', 'plannedEndDate']
filterNoFilter criteria — multiple fields are combined with AND; multiple values within one field use OR.
startAtNoZero-indexed offset for pagination (URL query param). Default: 0.
maxResultsNoNumber of results per page (URL query param). Default: 20. Maximum: 100. To page through results, increment startAt by 20 until startAt >= total.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesTest cycles on this page
totalYesTotal matching test cycles across all pages
startAtYesOffset of this page
maxResultsYesPage size used for this response
Install Server

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the readOnly/idempotent/non-destructive annotations, the description discloses important behaviors: projectId is auto-injected, plannedStartDate/plannedEndDate are not returned by default, date formats are case-sensitive, filter fields combine with AND/OR semantics, and the response shape is described. This gives an agent accurate expectations about what the tool does and what it returns.

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 and front-loaded, opening with a concise summary and using clear headers for output, use cases, examples, and hints. However, it is noticeably long and contains some redundancy: parameter details and hints repeat the field lists, sort rules, and date formats already present in the schema. This is minor given the complexity of the tool, but it keeps the score from being a perfect 5.

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 filter complexity, nested schema, and many available fields, the description is essentially complete. It covers supported filter fields, output shape, pagination behavior, default values, date semantics, example requests, and the critical prerequisite that project context must already be selected. An agent has everything needed to construct valid calls and interpret responses.

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?

Even though schema coverage is 100%, the description adds substantial semantic value: it explains that filter fields combine with AND while values within a field use OR, that date filters use a specific 'dd/MMM/yyyy,dd/MMM/yyyy' format, that planned dates must be explicitly requested, and that sort uses 'fieldName:order.' The examples demonstrate realistic parameter combinations and expected outputs, going well beyond the schema alone.

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 opens with a specific verb and resource: 'Search for test cycles in a QTM4J project by status, owner, folder, date range, or keyword.' It also identifies the toolset (Test Cycles) and clearly separates this read/search operation from create/update cycle tools and from test-case search tools in the sibling list. This is more than a restatement of the title; it names the primary dimensions of search.

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 use: the prerequisite 'set_project_context must be called before this tool,' a list of use cases, and explicit guardrails such as 'NEVER auto-select a project' and 'Do NOT use any other filter field names.' It does not explicitly name alternatives like qtm4j_create_test_cycle or qtm4j_search_linked_test_cases_in_test_cycle, so it stops short of true when-to-use vs. alternative guidance.

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