qmetry_fetch_test_cases
Fetch QMetry test cases - automatically handles viewId resolution based on project Parameters: - projectKey (string): Project key - unique identifier for the project (default: "default") - baseUrl (string): The base URL for the QMetry instance (must be a valid URL) (default: "https://testmanageme...
This record as markdown: /tools/smartbear-mcp/qmetry-fetch-test-cases.md
What qmetry_fetch_test_cases does on SmartBear MCP
AI agents call qmetry_fetch_test_cases to retrieve information from SmartBear MCP without modifying anything. It is typically the context-gathering step in research, monitoring, and reporting workflows, before the agent takes action elsewhere.
| Parameter | Type | Required | Description |
|---|---|---|---|
page | number | — | Page number to return (starts from 1) |
limit | number | — | Number of records (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 be |
start | number | — | Start index for pagination - defaults to 0 |
filter | string | — | Filter criteria as JSON string (default '[]') |
viewId | number | Yes | ViewId for test cases - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey a |
baseUrl | string | — | The base URL for the QMetry instance (must be a valid URL) |
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 (te |
udfFilter | string | — | User-defined field filter as JSON string (default '[]') |
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 |
projectKey | string | — | Project key - unique identifier for the project |
showRootOnly | boolean | — | Whether to show only root folders. |
Parameters from the server's own tool schema.
Why qmetry_fetch_test_cases is rated Low
This tool retrieves test case data from QMetry without side effects. It queries an existing system and returns test case information based on project and view identifiers. No creation, modification, deletion, or code execution is described.
From the tool's definition Tool name and description indicate "Fetch QMetry test cases" - a retrieval operation with "automatically handles viewId resolution".
Risk signalsHigh parameter count (17 properties) · Admin/system-level operation
Attacks that exploit this kind of access
The rule that runs qmetry_fetch_test_cases safely
PolicyLayer is an MCP gateway: it sits between your AI agents and SmartBear MCP, and checks every tool call against a rule you set before the call runs. Nothing changes on the server itself. For qmetry_fetch_test_cases, this is the rule to start with:
qmetry_fetch_test_cases is read-only, so it stays allowed. Everything else on the server is denied unless you say otherwise.
The button opens the PolicyLayer dashboard: create your workspace, connect SmartBear MCP, apply this rule, and every qmetry_fetch_test_cases call is checked against it from then on.
Questions about qmetry_fetch_test_cases
Fetch QMetry test cases - automatically handles viewId resolution based on project Parameters: - projectKey (string): Project key - unique identifier for the project (default: "default") - baseUrl (string): The base URL for the QMetry instance (must be a valid URL) (default: "https://testmanagement.qmetry.com") - viewId (number) *required*: 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. Manual viewId only needed if you want to override the automatic resolution. - 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 json {} Expected Output: List of test cases from default project with auto-resolved viewId 2. Get all test cases from UT project - system will auto-fetch UT project's viewId json { "projectKey": "UT" } Expected Output: List of test cases from UT project using UT's specific TC viewId 3. Get test cases with manual viewId (skip auto-resolution) json { "projectKey": "MAC", "viewId": 167136, "folderPath": "" } Expected Output: Test cases using manually specified viewId 167136 4. List test cases from specific project (ex: project key can be anything (VT, UT, PROJ1, TEST9) json { "projectKey": "use specific given project key", "viewId": "fetch specific project given projectKey Test Case ViewId", "folderPath": "" } Expected Output: Test cases using manually specified viewId 167136 or projectKey 5. Get test cases by release/cycle filter json { "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) 6. Get test cases by release only json { "projectKey": "MAC", "filter": "[{\"value\":[55178],\"type\":\"list\",\"field\":\"release\"}]" } Expected Output: All test cases associated with Release 8.12 (ID: 55178) 7. Get test cases by cycle only json { "projectKey": "MAC", "filter": "[{\"value\":[111577],\"type\":\"list\",\"field\":\"cycle\"}]" } Expected Output: All test cases associated with Cycle 8.12.1 (ID: 111577) 8. Search for specific test case by entity key json { "projectKey": "MAC", "filter": "[{\"type\":\"string\",\"value\":\"MAC-TC-1684\",\"field\":\"entityKeyId\"}]" } Expected Output: Test cases matching the entity key criteria 9. Search for multiple test cases by comma-separated entity keys json { "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. It is categorised as a Read tool in the SmartBear MCP MCP Server, which means it retrieves data without modifying state.
qmetry_fetch_test_cases accepts 12 parameters: page, limit, scope, start, filter, viewId, baseUrl, folderID, udfFilter, folderPath, projectKey, showRootOnly. Required: viewId. The full parameter table on this page comes from the server's own tool schema.
Register the SmartBear MCP server in PolicyLayer and add a rule for qmetry_fetch_test_cases: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches SmartBear MCP. Nothing to install.
qmetry_fetch_test_cases is a Read tool with low risk. Read-only tools are generally safe to allow by default.
Yes. Add a rate_limit block to the qmetry_fetch_test_cases rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for qmetry_fetch_test_cases. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
qmetry_fetch_test_cases is provided by the SmartBear MCP server (SmartBear/smartbear-mcp). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
More on SmartBear, and thousands of servers like it.
This server
Across the catalogue