# qmetry_fetch_defects_or_issues

Fetch QMetry defects or issues - 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 issues - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and extract latestViews.IS.viewId automatically. Manual viewId only needed if you want to override the automatic resolution. - 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) - filter (string): Filter criteria as JSON string (default '[]') (default: "[]") - isJiraIntegrated (boolean): Send true if current project is Integrated with Jira (default: false) - sort (string): Sort Records - refer json schema, Possible property - entityKey, name, typeAlias, stateAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, priorityAlias, createdSystem, linkedTcrCount, linkedRqCount, dfOwner, attachmentCount, environmentText (default: "[{\"property\":\"name\",\"direction\":\"ASC\"}]") Output Description: JSON object with 'data' array containing issues and pagination info Use Cases: 1. List all issues in a project 2. Search for specific issues using filters 3. Get paginated issue results Examples: 1. Get all issues from default project - system will auto-fetch viewId json {} Expected Output: List of issues from default project with auto-resolved viewId 2. Get all issues from UT project - system will auto-fetch UT project's viewId json { "projectKey": "UT" } Expected Output: List of issues from UT project using UT's specific IS viewId 3. Get issues with manual viewId (skip auto-resolution) json { "projectKey": "MAC", "viewId": 166065 } Expected Output: Issues using manually specified viewId 166065 4. List issues 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 defects or issues ViewId" } Expected Output: Issues using manually specified viewId 103097 or projectKey 5. Get issues by release/cycle filter json { "projectKey": "MAC", "filter": "[{\"value\":[55178],\"type\":\"list\",\"field\":\"release\"},{\"value\":[111577],\"type\":\"list\",\"field\":\"cycle\"}]" } Expected Output: Issues associated with Release 8.12 (ID: 55178) and Cycle 8.12.1 (ID: 111577) 6. Get issues by release only json { "projectKey": "MAC", "filter": "[{\"value\":[55178],\"type\":\"list\",\"field\":\"release\"}]" } Expected Output: All defects or issues associated with Release 8.12 (ID: 55178) 7. Get issues by cycle only json { "projectKey": "MAC", "filter": "[{\"value\":[111577],\"type\":\"list\",\"field\":\"cycle\"}]" } Expected Output: All defects or issues associated with Cycle 8.12.1 (ID: 111577) 8. Search for specific issue by entity key json { "projectKey": "MAC", "filter": "[{\"type\":\"string\",\"value\":\"MAC-IS-636\",\"field\":\"entityKeyId\"}]" } Expected Output: Issues matching the entity key criteria 9. Search for multiple defects or issues by comma-separated entity keys json { "projectKey": "MAC", "filter": "[{\"type\":\"string\",\"value\":\"MAC-IS-636,MAC-IS-637,MAC-IS-638\",\"field\":\"entityKeyId\"}]" } Expected Output: Issues matching any of the specified entity keys Hints: 1. CRITICAL WORKFLOW: Always use the SAME projectKey for both project info and issues fetching 2. Step 1: If user specifies projectKey (like 'UT', 'MAC'), use that EXACT projectKey for project info 3. Step 2: Get project info using that projectKey, extract latestViews.IS.viewId 4. Step 3: Use the SAME projectKey and the extracted IS viewId for fetching issues 5. Step 4: If user doesn't specify projectKey, use 'default' for both project info and issues fetching 6. NEVER mix project keys - if user says 'MAC project', use projectKey='MAC' for everything 7. For search by issues key (like MAC-IS-1684), use filter: '[{"type":"string","value":"MAC-IS-1684","field":"entityKeyId"}]' 8. RELEASE/CYCLE FILTERING: Use release and cycle IDs, not names, for filtering 9. For release filter: '[{"value":[releaseId],"type":"list","field":"release"}]' 10. For cycle filter: '[{"value":[cycleId],"type":"list","field":"cycle"}]' 11. For combined release+cycle: '[{"value":[releaseId],"type":"list","field":"release"},{"value":[cycleId],"type":"list","field":"cycle"}]' 12. Get release/cycle IDs from FETCH_RELEASES_AND_CYCLES tool before filtering 13. FILTER FIELDS: name, stateAlias, typeAlias, entityKeyId, createdDate, createdByAlias, updatedDate, updatedByAlias, createdSystem, dfOwner, priorityAlias, linkedTcrCount, linkedRqCount, attachmentCount, componentAlias, environmentText 14. SORT FIELDS: entityKey, name, typeAlias, stateAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, priorityAlias, createdSystem, linkedTcrCount, linkedRqCount, dfOwner, attachmentCount, environmentText 15. For multiple entity keys, use comma-separated values in filter 16. Use pagination for large result sets (start, page, limit parameters) 17. This tool is essential for defect management and issue tracking 18. Critical for quality assurance and defect lifecycle analysis 19. Use for compliance reporting and issue traceability 20. Helps maintain visibility into project defects and issues

Agent View of the PolicyLayer registry record for `qmetry_fetch_defects_or_issues`. HTML page: https://policylayer.com/tools/smartbear-mcp/qmetry-fetch-defects-or-issues

## Facts

- Tool: `qmetry_fetch_defects_or_issues`
- Server: SmartBear MCP (`SmartBear/smartbear-mcp`) — https://policylayer.com/tools/smartbear-mcp.md
- Homepage: https://github.com/SmartBear/smartbear-mcp
- Risk category: Read (Low risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 9 (1 required)
- Recommended policy verdict: Allowed

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `page` | number | no | Page number to return (starts from 1) |
| `sort` | string | no | Sort Records - refer json schema, Possible property - entityKey, name, typeAlias, stateAlias, createdDate, createdByAlias, updatedDate, updatedByAlias, priority |
| `limit` | number | no | Number of records (default 10). |
| `start` | number | no | Start index for pagination - defaults to 0 |
| `filter` | string | no | Filter criteria as JSON string (default '[]') |
| `viewId` | number | yes | ViewId for issues - SYSTEM AUTOMATICALLY RESOLVES THIS. Leave empty unless you have a specific viewId. System will fetch project info using the projectKey and e |
| `baseUrl` | string | no | The base URL for the QMetry instance (must be a valid URL) |
| `projectKey` | string | no | Project key - unique identifier for the project |
| `isJiraIntegrated` | boolean | no | Send true if current project is Integrated with Jira |

Parameters from the server's own tool schema.

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "qmetry_fetch_defects_or_issues",
    "arguments": {
      "viewId": 0
    }
  }
}
```

## Why qmetry_fetch_defects_or_issues is rated Low

This tool queries and retrieves defect/issue data from QMetry without any side effects. It performs a simple data retrieval operation that does not create, modify, delete, or execute arbitrary code. The automatic viewId resolution is still a read operation. Misuse would result in information disclosure at worst, not system compromise or data loss.

From the tool's own definition: "Tool name includes 'fetch' and description states 'Fetch QMetry defects or issues' - retrieval operation with no modification or deletion. Parameters are read-only (projectKey, baseUrl, viewId for filtering)."

## Use case

AI agents call qmetry_fetch_defects_or_issues 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.

## Recommended policy (PolicyLayer)

Verdict: **Allowed**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches SmartBear MCP:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "qmetry_fetch_defects_or_issues": {}
  }
}
```

## Other tools on SmartBear MCP (239)

- `collaborator_delete_collaborator_remote_system_configuration` — Destructive — https://policylayer.com/tools/smartbear-mcp/collaborator-delete-collaborator-remote-system-configuration.md
- `contract-testing_admin_delete_role` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-delete-role.md
- `contract-testing_admin_delete_team` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-delete-team.md
- `contract-testing_admin_delete_user` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-delete-user.md
- `contract-testing_admin_remove_role_from_user` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-remove-role-from-user.md
- `contract-testing_admin_remove_user_from_team` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-remove-user-from-team.md
- `contract-testing_admin_reset_roles` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-admin-reset-roles.md
- `contract-testing_delete_all_integrations` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-all-integrations.md
- `contract-testing_delete_branch` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-branch.md
- `contract-testing_delete_environment` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-environment.md
- `contract-testing_delete_integration` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-integration.md
- `contract-testing_delete_pacticipant` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-pacticipant.md
- `contract-testing_delete_secret` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-secret.md
- `contract-testing_delete_webhook` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-delete-webhook.md
- `contract-testing_regenerate_api_token` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-regenerate-api-token.md
- `contract-testing_remove_label_from_pacticipant` — Destructive — https://policylayer.com/tools/smartbear-mcp/contract-testing-remove-label-from-pacticipant.md
- `reflect_cancel_suite_execution` — Destructive — https://policylayer.com/tools/smartbear-mcp/reflect-cancel-suite-execution.md
- `reflect_delete_previous_step` — Destructive — https://policylayer.com/tools/smartbear-mcp/reflect-delete-previous-step.md
- `swagger_delete_portal_product` — Destructive — https://policylayer.com/tools/smartbear-mcp/swagger-delete-portal-product.md
- `swagger_delete_table_of_contents` — Destructive — https://policylayer.com/tools/smartbear-mcp/swagger-delete-table-of-contents.md
- `collaborator_reviewservice_action` — Execute — https://policylayer.com/tools/smartbear-mcp/collaborator-reviewservice-action.md
- `collaborator_test_collaborator_remote_system_configuration_connection` — Execute — https://policylayer.com/tools/smartbear-mcp/collaborator-test-collaborator-remote-system-configuration-connection.md
- `contract-testing_execute_webhook` — Execute — https://policylayer.com/tools/smartbear-mcp/contract-testing-execute-webhook.md
- `contract-testing_generate_pact_tests` — Execute — https://policylayer.com/tools/smartbear-mcp/contract-testing-generate-pact-tests.md
- `contract-testing_review_pact_tests` — Execute — https://policylayer.com/tools/smartbear-mcp/contract-testing-review-pact-tests.md
- `contract-testing_test_execute_webhooks` — Execute — https://policylayer.com/tools/smartbear-mcp/contract-testing-test-execute-webhooks.md
- `reflect_add_prompt_step` — Execute — https://policylayer.com/tools/smartbear-mcp/reflect-add-prompt-step.md
- `reflect_connect_to_session` — Execute — https://policylayer.com/tools/smartbear-mcp/reflect-connect-to-session.md
- `reflect_execute_suite` — Execute — https://policylayer.com/tools/smartbear-mcp/reflect-execute-suite.md
- `reflect_run_test` — Execute — https://policylayer.com/tools/smartbear-mcp/reflect-run-test.md
- …and 209 more: https://policylayer.com/tools/smartbear-mcp.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=smartbear-mcp · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/smartbear-mcp
