Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QTM4J: Search Test Cases

qtm4j_search_test_cases
Read-onlyIdempotent

Search and filter test cases in a QTM4J project using filters like status, priority, labels, and assignee. Supports pagination, field selection, and sorting for efficient access.

Instructions

Search and filter test cases in a QTM4J project with support for pagination, field selection, and sorting.

Toolset: Test Cases

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, all fields are returned. Available fields: key, summary, description, priority, status, assignee, isAutomated, reporter, estimatedTime, labels, components, fixVersions, sprint, folders, updated, created, executed, flakyScore, passRateScore, aiGenerated, precondition, orderNo, seqNo, version. Example: ['key', 'summary', 'status', 'priority', 'assignee']

  • startAt (number): Zero-indexed offset for pagination (URL query param). First page: 0. Second page: 50 (when maxResults=50). Default: 0. (default: 0)

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

  • sort (string): Sort pattern sent as a URL query param. Format: 'fieldName:order'. For multiple fields, comma-separate: 'priority:asc,created:desc'. Order values: 'asc' (oldest/lowest first) or 'desc' (newest/highest first). Sortable fields: key, summary, created, updated, status, priority, executed. Examples: 'created:desc', 'key:asc', 'priority:desc,created:asc'

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

Use Cases: 1. Search all test cases in a project 2. Filter test cases by status (e.g., 'Done', 'To Do', 'In Progress') 3. Filter test cases by priority (e.g., 'High', 'Medium', 'Low') 4. Filter test cases by labels and components 5. Search test cases by text in summary and description 6. Filter test cases by assignee or reporter 7. Filter test cases by creation/update date ranges 8. Filter test cases by automation status 9. Request only specific fields to reduce response size 10. Sort results using the sort query param (e.g., 'created:desc', 'priority:asc') 11. Paginate through large result sets using startAt and maxResults 12. Combine multiple filters for complex queries 13. Find all failed test cases that need attention (by status and execution date) 14. Get test cases for sprint planning (filter by sprint and status) 15. Audit test coverage by searching for untested areas (filter by executed date) 16. Find all manual test cases assigned to a specific tester 17. Generate test reports by filtering and sorting test cases 18. Track test case changes over time (filter by update date range) 19. Identify high-priority test cases pending review 20. Search for test cases related to specific features (using searchText) 21. Find duplicate or similar test cases (using searchText) 22. Get automated vs manual test distribution (filter by isAutomated) 23. Monitor test execution trends (filter by executed date ranges) 24. Prepare test execution schedules (filter by assignee and priority)

Examples:

  1. Search all test cases in the project

{}

Expected Output: Paginated list of all test cases with all fields (first 50 results)

  1. Filter test cases by status

{
  "filter": {
    "status": [
      "Done"
    ]
  }
}

Expected Output: List of test cases with 'Done' status

  1. Filter by multiple statuses and priorities with specific fields

{
  "filter": {
    "status": [
      "Done",
      "To Do"
    ],
    "priority": [
      "High",
      "Medium"
    ]
  },
  "fields": [
    "key",
    "summary",
    "status",
    "priority",
    "assignee"
  ]
}

Expected Output: Test cases matching the filters with only the selected fields returned

  1. Search test cases by text in summary/description

{
  "filter": {
    "searchText": "login functionality"
  }
}

Expected Output: Test cases containing 'login functionality' in summary or description

  1. Filter by labels and components

{
  "filter": {
    "labels": [
      "Release_1",
      "Sprint 1"
    ],
    "components": [
      "UI",
      "Cloud"
    ]
  }
}

Expected Output: Test cases tagged with the specified labels and components

  1. Filter by assignee and automation status

{
  "filter": {
    "assignee": [
      "712020:ddc8e24b-2de7-404b-b9ed-3d7b241e2ced"
    ],
    "isAutomated": false
  }
}

Expected Output: Manual test cases assigned to the specified user

  1. Filter by creation date range

{
  "filter": {
    "createdOnFrom": "01/Jan/2026",
    "createdOnTo": "31/Dec/2026"
  }
}

Expected Output: Test cases created during 2026

  1. Paginate and sort by creation date (newest first)

{
  "filter": {
    "status": [
      "Done"
    ]
  },
  "startAt": 0,
  "maxResults": 50,
  "sort": "created:desc"
}

Expected Output: First 50 'Done' test cases sorted by creation date, newest first

  1. Get all available fields for test cases

{
  "filter": {},
  "fields": [
    "key",
    "summary",
    "description",
    "priority",
    "status",
    "assignee",
    "isAutomated",
    "reporter",
    "estimatedTime",
    "labels",
    "components",
    "fixVersions",
    "sprint",
    "folders",
    "updated",
    "created",
    "executed",
    "flakyScore",
    "passRateScore",
    "aiGenerated",
    "precondition",
    "orderNo",
    "seqNo",
    "version"
  ]
}

Expected Output: Test cases with all available fields explicitly requested

  1. Filter by folder and fix version

{
  "filter": {
    "folders": [
      123,
      456
    ],
    "fixVersions": [
      789
    ]
  }
}

Expected Output: Test cases in the specified folders and fix versions

  1. Complex filter: multiple criteria combined with multi-field sort

{
  "filter": {
    "status": [
      "Done",
      "In Progress"
    ],
    "priority": [
      "High"
    ],
    "labels": [
      "Release_1"
    ],
    "isAutomated": false,
    "createdOnFrom": "01/Apr/2026",
    "createdOnTo": "30/Apr/2026"
  },
  "fields": [
    "key",
    "summary",
    "status",
    "priority",
    "created"
  ],
  "sort": "priority:asc,created:desc"
}

Expected Output: High-priority manual test cases created in April 2026 with 'Done' or 'In Progress' status, sorted by priority ascending then creation date descending

  1. Find all automated test cases for CI/CD pipeline

{
  "filter": {
    "isAutomated": true,
    "status": [
      "Done",
      "In Progress"
    ]
  },
  "fields": [
    "key",
    "summary",
    "status",
    "labels",
    "components"
  ]
}

Expected Output: Up to 50 automated test cases ready for execution in CI/CD

  1. Sprint planning: get pending test cases for a team, sorted by priority

{
  "filter": {
    "status": [
      "To Do",
      "In Progress"
    ],
    "assignee": [
      "712020:ddc8e24b-2de7-404b-b9ed-3d7b241e2ced",
      "712020:b8479b55-6d23-478c-a2ad-4c8ce176e1fc"
    ],
    "priority": [
      "High",
      "Medium"
    ]
  },
  "fields": [
    "key",
    "summary",
    "status",
    "priority",
    "assignee",
    "estimatedTime"
  ],
  "sort": "priority:desc"
}

Expected Output: Pending high and medium priority test cases assigned to the team, sorted by priority descending

  1. Test coverage report: find completed cases sorted oldest first

{
  "filter": {
    "status": [
      "Done"
    ]
  },
  "fields": [
    "key",
    "summary",
    "priority",
    "created",
    "assignee"
  ],
  "sort": "created:asc"
}

Expected Output: Completed test cases sorted by creation date, oldest first

  1. Find test cases by keyword for regression testing

{
  "filter": {
    "searchText": "authentication login",
    "status": [
      "Done"
    ]
  },
  "fields": [
    "key",
    "summary",
    "description",
    "labels",
    "components"
  ]
}

Expected Output: All completed test cases related to authentication/login functionality

  1. Weekly test execution summary

{
  "filter": {
    "executedOnFrom": "27/Apr/2026",
    "executedOnTo": "03/May/2026"
  },
  "fields": [
    "key",
    "summary",
    "status",
    "executed",
    "passRateScore",
    "flakyScore"
  ],
  "sort": "executed:desc"
}

Expected Output: Test cases executed in the past week with their pass rates and flaky scores, sorted most-recent first

Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. REQUEST STRUCTURE: filter goes in the request body; fields, sort, startAt, and maxResults are URL query parameters. 3. The 'projectId' inside filter is auto-populated from the active project context if not provided. 4. All filter values accept string names directly — no ID resolution needed (e.g., status: ['Done'], priority: ['High']). 5. FIELDS: Pass as an array (sent as comma-separated URL param). Example: { fields: ['key', 'summary', 'status'] }. Omit to return all fields. 6. Available fields: key, summary, description, priority, status, assignee, isAutomated, reporter, estimatedTime, labels, components, fixVersions, sprint, folders, updated, created, executed, flakyScore, passRateScore, aiGenerated, precondition, orderNo, seqNo, version 7. SORTING: Use 'sort' with format 'fieldName:order' (asc/desc). Multiple fields: 'priority:asc,created:desc'. Sortable fields: key, summary, created, updated, status, priority, executed. 8. PAGINATION: startAt (default: 0) and maxResults (default: 50, max: 50) are sent as URL query params. Increment startAt by 50 to get the next page. Stop when startAt >= total. 9. Date format for all filter date fields: 'dd/MMM/yyyy' (e.g., '17/Apr/2026', '01/Jan/2026'). Case-sensitive. 10. FILTER LOGIC: Multiple values within one filter field use OR (status: ['Done', 'To Do'] = Done OR To Do). 11. FILTER LOGIC: Different filter fields are combined with AND (status + priority = both must match). 12. The 'searchText' filter searches both summary and description fields (case-insensitive). To get details of a specific test case by its key (e.g., 'SCRUM-TC-145'), pass the key as filter.searchText — there is no separate key filter field. 13. For assignee/reporter filters, use Jira account IDs (format: '712020:uuid'). Multiple IDs = OR logic. 14. Omitting filter entirely returns all test cases in the active project (paginated).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort pattern sent as a URL query param. Format: 'fieldName:order'. For multiple fields, comma-separate: 'priority:asc,created:desc'. Order values: 'asc' (oldest/lowest first) or 'desc' (newest/highest first). Sortable fields: key, summary, created, updated, status, priority, executed. Examples: 'created:desc', 'key:asc', 'priority:desc,created:asc'
fieldsNoFields to include in each result object. If omitted, all fields are returned. Available fields: key, summary, description, priority, status, assignee, isAutomated, reporter, estimatedTime, labels, components, fixVersions, sprint, folders, updated, created, executed, flakyScore, passRateScore, aiGenerated, precondition, orderNo, seqNo, version. Example: ['key', 'summary', 'status', 'priority', 'assignee']
filterNoFilter criteria — multiple fields are combined with AND; multiple values within one field use OR.
startAtNoZero-indexed offset for pagination (URL query param). First page: 0. Second page: 50 (when maxResults=50). Default: 0.
maxResultsNoNumber of results per page (URL query param). Default: 50. Maximum: 50 (backend enforced). To page through results, increment startAt by 50 until startAt >= total.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataYesTest cases on this page
totalYesTotal test cases 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 read-only and idempotent. The description adds rich behavioral context: output structure, pagination details (maxResults=50, startAt increments), filter logic (AND across fields, OR within), date format, field selection behavior, and sort format. 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.

Conciseness4/5

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

The description is well-structured with clear sections (Toolset, Parameters, Output, Use Cases, Examples, Hints). The purpose is front-loaded. While long, each section earns its place by providing essential information. Could be slightly more concise in the use cases list (25 items is thorough but some overlap).

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 is highly complete for the tool's complexity. It covers prerequisites, all parameter semantics, filter logic, pagination, output structure, sort behavior, field selection, date format, and provides 16 examples covering common scenarios. Despite having an output schema, the description adds necessary behavioral 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?

With 100% schema coverage, baseline is 3. However, the description goes far beyond schema: it provides detailed parameter semantics including sort format, filter logic, pagination mechanics, field selection behavior, date format, and extensive examples for each parameter. This adds significant meaning.

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 states the tool searches and filters test cases with pagination, field selection, and sorting, clearly distinguishing it from sibling tools like qtm4j_create_test_case or qtm4j_get_test_steps.

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 extensive usage guidelines including a prerequisite (set_project_context), 25 use cases covering many scenarios, and hints on parameter usage, pagination, field selection, and sorting. It implicitly differentiates from sibling search tools (e.g., qtm4j_search_test_cycles).

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