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 a QTM4J project by status, owner, date range, or keyword. Supports pagination, sorting, and field selection for custom responses.

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
Behavior5/5

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

Annotations indicate readOnlyHint=true and idempotentHint=true, and the description reinforces this by describing a search operation. It adds significant behavioral traits: pagination guidance (increment startAt by maxResults), default field exclusions (plannedStartDate/plannedEndDate), output structure, AND/OR filter logic, and date format case sensitivity.

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 long but well-structured and front-loaded with purpose. It includes sections for parameters, output, use cases, examples, and hints. Every part adds value, though it could be slightly more concise given the extensive examples.

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 description covers all aspects: filter fields, date format, pagination, sorting, field selection, output structure, prerequisites, and 7 detailed examples. Given the tool's complexity and rich schema, it is fully complete.

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?

With 100% schema coverage, the description still adds value: for 'fields' it notes default exclusions, for 'maxResults' it explains pagination, for 'sort' it lists sortable fields, and for 'filter' it details supported fields and logic. 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 clearly states 'Search for test cycles in a QTM4J project by status, owner, folder, date range, or keyword.' It specifies the verb (search), resource (test cycles), and many filter criteria, distinguishing it from sibling tools like qtm4j_create_test_cycle and qtm4j_search_test_cases.

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 includes a 'Hints' section that explicitly states the prerequisite 'set_project_context' and warns against auto-selecting a project. It also provides guidance on appropriate date filters (createdOn vs plannedStartDate) and folder ID retrieval. While it does not explicitly state when NOT to use, the context is clear.

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