Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QMetry: Fetch Test Cases

qmetry_fetch_test_cases
Read-onlyIdempotent

Fetch QMetry test cases from projects, folders, releases, or cycles. Automatically resolves viewId and supports filters, pagination, and bulk export.

Instructions

Fetch QMetry test cases - automatically handles viewId resolution based on project

Toolset: Test Cases

Parameters:

  • projectKey (string): Project key - unique identifier for the project (default: "default")

  • viewId (number): ViewId for test cases - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.TC.viewId automatically.

  • folderPath (string): Folder path for test cases - SYSTEM AUTOMATICALLY SETS TO ROOT. Leave empty unless you want specific folder. System will automatically use empty string "" (root directory). Only specify if user wants specific folder like "Automation/Regression". (default: "")

  • folderID (number): Folder ID - unique numeric identifier for the specific folder. Use this to target a specific folder within the project hierarchy. Applies to any entity type (test cases, requirements, test suites, etc.).

  • start (number): Start index for pagination - defaults to 0 (default: 0)

  • page (number): Page number to return (starts from 1) (default: 1)

  • limit (number): Number of records (default 10). (default: 10)

  • scope (string): Scope of the operation - defines the context for data retrieval. Common values: 'project' (default), 'folder', 'release', 'cycle'. Applies to any entity type being fetched or operated upon. (default: "project")

  • showRootOnly (boolean): Whether to show only root folders.

  • getSubEntities (boolean): Whether to include sub-entities.

  • hideEmptyFolders (boolean): Whether to hide empty folders.

  • folderSortColumn (string): Folder sort column (default 'name')

  • restoreDefaultColumns (boolean): Whether to restore default columns (default 'false')

  • folderSortOrder (string): Folder sort order (ASC or DESC)

  • filter (string): Filter criteria as JSON string (default '[]') (default: "[]")

  • udfFilter (string): User-defined field filter as JSON string (default '[]') (default: "[]")

Output Description: JSON object with 'data' array containing test cases and pagination info

Use Cases: 1. List all test cases in a project (without filters) 2. Browse test cases in specific folders for bulk operations 3. Get paginated test case results for reporting 4. Export multiple test cases at once

Examples:

  1. Get all test cases from default project - system will auto-fetch viewId

{}

Expected Output: List of test cases from default project with auto-resolved viewId

  1. Get all test cases from UT project - system will auto-fetch UT project's viewId

{
  "projectKey": "UT"
}

Expected Output: List of test cases from UT project using UT's specific TC viewId

  1. Get test cases by release/cycle filter

{
  "projectKey": "MAC",
  "filter": "[{\"value\":[55178],\"type\":\"list\",\"field\":\"release\"},{\"value\":[111577],\"type\":\"list\",\"field\":\"cycle\"}]"
}

Expected Output: Test cases associated with Release 8.12 (ID: 55178) and Cycle 8.12.1 (ID: 111577)

  1. Get test cases by release only

{
  "projectKey": "MAC",
  "filter": "[{\"value\":[55178],\"type\":\"list\",\"field\":\"release\"}]"
}

Expected Output: All test cases associated with Release 8.12 (ID: 55178)

  1. Get test cases by cycle only

{
  "projectKey": "MAC",
  "filter": "[{\"value\":[111577],\"type\":\"list\",\"field\":\"cycle\"}]"
}

Expected Output: All test cases associated with Cycle 8.12.1 (ID: 111577)

  1. Search for specific test case by entity key

{
  "projectKey": "MAC",
  "filter": "[{\"type\":\"string\",\"value\":\"MAC-TC-1684\",\"field\":\"entityKeyId\"}]"
}

Expected Output: Test cases matching the entity key criteria

  1. Search for multiple test cases by comma-separated entity keys

{
  "projectKey": "MAC",
  "filter": "[{\"type\":\"string\",\"value\":\"MAC-TC-1684,MAC-TC-1685,MAC-TC-1686\",\"field\":\"entityKeyId\"}]"
}

Expected Output: Test cases matching any of the specified entity keys

Hints: 1. CRITICAL - FILTER PERSISTENCE WARNING: 2. DO NOT use this API with filters to fetch a single test case by ID, entityKey, or name! 3. Filters applied to this API persist in the production UI and cause only filtered records to be visible to users. 4. This creates a major UX problem where users see incomplete data in their QMetry portal. 5. 6. CORRECT APPROACH FOR SINGLE TEST CASE: 7. When user asks to 'fetch test case VKMCP-TC-5' or 'get test case by ID 123' or 'find test case named X': 8. 1. Ask user for the numeric test case ID (tcID) if not provided 9. 2. Use 'Fetch Test Case Details' tool with the numeric tcID parameter 10. 3. NEVER use 'Fetch Test Cases' with entityKeyId filter for single test case lookup 11. 12. WHEN TO USE THIS TOOL: 13. Only use this tool when user explicitly asks for: 14. - 'List all test cases' 15. - 'Show me test cases in folder X' 16. - 'Get all test cases' (without specifying a single test case) 17. - 'Export test cases' (for bulk operations) 18. 19. CRITICAL WORKFLOW: Always use the SAME projectKey for both project info and test case fetching 20. Step 1: If user specifies projectKey (like 'UT', 'MAC'), use that EXACT projectKey for project info 21. Step 2: Get project info using that projectKey, extract latestViews.TC.viewId 22. Step 3: Use the SAME projectKey and the extracted TC viewId for fetching test cases 23. Step 4: If user doesn't specify projectKey, use 'default' for both project info and test case fetching 24. NEVER mix project keys - if user says 'MAC project', use projectKey='MAC' for everything 25. DEPRECATED: Do not use filter with entityKeyId for single test case - use 'Fetch Test Case Details' instead 26. RELEASE/CYCLE FILTERING: Use release and cycle IDs, not names, for filtering 27. For release filter: '[{"value":[releaseId],"type":"list","field":"release"}]' 28. For cycle filter: '[{"value":[cycleId],"type":"list","field":"cycle"}]' 29. For combined release+cycle: '[{"value":[releaseId],"type":"list","field":"release"},{"value":[cycleId],"type":"list","field":"cycle"}]' 30. Get release/cycle IDs from FETCH_RELEASES_AND_CYCLES tool before filtering 31. FILTER FIELDS: entityKeyId, priorityAlias, createdByAlias, updatedByAlias, testCaseStateAlias, testingTypeAlias, testCaseTypeAlias, componentAlias, owner, release, cycle 32. SORT FIELDS: entityKey, name, associatedVersion, priorityAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, testCaseStateAlias, testingTypeAlias, executionMinutes 33. For multiple entity keys, use comma-separated values in filter 34. Use empty string '' as folderPath for root directory

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number to return (starts from 1)
limitNoNumber of records (default 10).
scopeNoScope of the operation - defines the context for data retrieval. Common values: 'project' (default), 'folder', 'release', 'cycle'. Applies to any entity type being fetched or operated upon.project
startNoStart index for pagination - defaults to 0
filterNoFilter criteria as JSON string (default '[]')[]
viewIdNoViewId for test cases - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.TC.viewId automatically.
folderIDNoFolder ID - unique numeric identifier for the specific folder. Use this to target a specific folder within the project hierarchy. Applies to any entity type (test cases, requirements, test suites, etc.).
udfFilterNoUser-defined field filter as JSON string (default '[]')[]
folderPathNoFolder path for test cases - SYSTEM AUTOMATICALLY SETS TO ROOT. Leave empty unless you want specific folder. System will automatically use empty string "" (root directory). Only specify if user wants specific folder like "Automation/Regression".
projectKeyNoProject key - unique identifier for the projectdefault
showRootOnlyNoWhether to show only root folders.
getSubEntitiesNoWhether to include sub-entities.
folderSortOrderNoFolder sort order (ASC or DESC)
folderSortColumnNoFolder sort column (default 'name')
hideEmptyFoldersNoWhether to hide empty folders.
restoreDefaultColumnsNoWhether to restore default columns (default 'false')
Install Server

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, but the description adds genuinely important behavior beyond those: filters persist in the production UI, viewId is auto-resolved from project info, and the same projectKey must be used consistently. The filter-persistence warning is a non-obvious side effect that annotations cannot express.

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

Conciseness2/5

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

The description is front-loaded with a clear purpose and uses sections, but it is heavily over-sized: it duplicates all 16 parameter descriptions, includes six large examples, and contains a rambling Hints section with broken numbering and repeated warnings. Many sentences restate schema content and could be removed without losing critical information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 16-param tool with no output schema, the description is nearly complete: it covers output shape, pagination parameters, filter syntax, release/cycle ID sourcing, and the critical projectKey workflow. The main gap is the lack of a detailed test-case object schema, but the expected-output examples largely compensate.

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?

The schema already covers all 16 parameters (100%), so the baseline is 3. The description adds real value through concrete filter JSON examples, valid filter field names, sort fields, and release/cycle syntax using IDs rather than names. The Parameters section mostly duplicates schema text, but the examples and hints meaningfully extend parameter understanding.

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 first sentence names the specific operation and resource ('Fetch QMetry test cases') and immediately adds the auto-viewId behavior that distinguishes the tool. The use cases and examples further make the list-vs-single-test-case distinction clear, especially relative to qmetry_fetch_test_case_details.

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 Hints section explicitly states when to use this tool ('List all test cases', 'Export test cases') and when not to (single test case lookup), explicitly directing the agent to use the 'Fetch Test Case Details' sibling instead. It also prescribes fetching release/cycle IDs via FETCH_RELEASES_AND_CYCLES before filtering, which is actionable routing 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