Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QTM4J: Get Linked Test Cases for Requirement

qtm4j_get_linked_test_cases_for_requirement
Read-onlyIdempotent

Retrieve test cases linked to a Jira requirement, with filters for status or priority. Paginate and select fields for efficient traceability audits.

Instructions

Retrieve the test cases linked to a Jira requirement in QTM4J. Requirement key is resolved to internal ID automatically.

Toolset: Requirements

Parameters:

  • requirementKey (string) required: Jira requirement key (e.g., 'SCRUM-1'). Resolved to the internal Jira issue ID automatically.

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

  • fields (string): Comma-separated field names to include in each result. Allowed: summary, priority, status, estimatedTime, executed, description, assignee, reporter, labels, components, fixVersions, sprint, isAutomated, folder, updated, created, seqNo, flakyScore, passRateScore.

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

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

  • sort (string): Sort in 'field:asc|desc' format. Allowed fields: key, summary, created, updated, estimatedTime, status, priority, latestVersionNo, seqNo, flakyScore, passRateScore.

Output Description: Paginated response with total, startAt, maxResults, and data array of linked test case objects.

Use Cases: 1. Check which test cases cover a Jira story or bug 2. Audit requirement traceability — find all test cases for a given requirement 3. Filter linked test cases by status or priority before a release 4. Retrieve test case keys to use in update or link operations

Examples:

  1. Get all test cases linked to a requirement

{
  "requirementKey": "SCRUM-1"
}

Expected Output: Paginated list of linked test cases

  1. Get high priority linked test cases

{
  "requirementKey": "SCRUM-5",
  "filter": {
    "priority": [
      "High"
    ]
  },
  "fields": "key,summary,status,priority",
  "sort": "key:asc"
}

Expected Output: Filtered high-priority test cases linked to requirement

  1. Paginate through linked test cases

{
  "requirementKey": "SCRUM-1",
  "maxResults": 20,
  "startAt": 20
}

Expected Output: Second page of linked test cases

Hints: 1. PREREQUISITE: set_project_context must be called before this tool. NEVER auto-select a project. 2. REQUIREMENT KEY FORMAT: '{PROJECT_KEY}-{number}' — e.g. 'SCRUM-1'. 3. projectId in filter is auto-filled from the active project context — do not set it manually. 4. Use the fields param to limit response size — only request fields you need. 5. Paginate using startAt — increment by maxResults until startAt >= total. 6. filter.testCaseStatus can be 'active', 'archived', or 'deleted' to filter by archive state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sortNoSort in 'field:asc|desc' format. Allowed fields: key, summary, created, updated, estimatedTime, status, priority, latestVersionNo, seqNo, flakyScore, passRateScore.
fieldsNoComma-separated field names to include in each result. Allowed: summary, priority, status, estimatedTime, executed, description, assignee, reporter, labels, components, fixVersions, sprint, isAutomated, folder, updated, created, seqNo, flakyScore, passRateScore.
filterNoOptional filter to narrow down the linked test cases. projectId is auto-filled from the active project context.
startAtNoZero-indexed offset for pagination. Default: 0.
maxResultsNoMaximum results per page (1-100). Default: 50.
requirementKeyYesJira requirement key (e.g., 'SCRUM-1'). Resolved to the internal Jira issue ID automatically.

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

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

Annotations already declare readOnlyHint, idempotentHint, and non-destructive. Description adds critical behavioral details: automatic internal ID resolution, auto-filled projectId, pagination behavior, output structure. 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?

Well-structured with clear sections (toolset, parameters, output, use cases, examples, hints). Front-loaded with main purpose. Slightly long but appropriate for the parameter complexity; no wasted sentences.

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?

Fully covers all aspects: purpose, parameters, output format, use cases, examples, and operational hints. With annotations covering safety and schema covering parameters, the description completes the picture for effective agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, baseline 3. Description adds meaning beyond schema by explaining automatic resolution of requirementKey, auto-filled projectId in filter, and explicit allowed values for fields and sort. 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 the tool retrieves test cases linked to a Jira requirement, with automatic resolution of the requirement key. It distinguishes this tool from siblings like qtm4j_get_linked_requirements and qtm4j_search_linked_test_cases_in_test_cycle by focusing on requirement-to-test-case linkage.

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?

Provides four concrete use cases (coverage check, traceability audit, pre-release filter, key retrieval) and hints including prerequisites (set_project_context) and requirement key format. Lacks explicit differentiation from sibling tools but offers clear context for when to invoke.

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