# qmetry_create_defect_or_issue

Create a new defect/issue internally in QMetry. 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") - issueType (number) *required*: Issue type ID (e.g. Bug, Enhancement, etc.) - issuePriority (number) *required*: Issue priority ID (e.g. High, Medium, Low, etc.) - summary (string) *required*: Summary or title of the defect/issue - description (string): Detailed description of the defect/issue - sync_with (string): External system to sync with (e.g. JIRA, QMetry, etc.) - issueOwner (number): Owner/user ID for the issue - component (array): Component IDs associated with the issue - affectedRelease (array): Release IDs affected by this issue - affectedCycles (array): Cycle IDs affected by this issue - tcRunID (number): Test Case Run ID to link this defect/issue to a test execution (optional) Output Description: JSON object containing the new create issue with id, dfid(defectID). Use Cases: 1. Create a basic defect/issue with just a summary 2. Set issueType, issueOwner, component, and affectedRelease using valid IDs from project info 3. Create defects/issues for automation or manual testing types 4. Link defects/issues to specific test case runs using tcRunID Examples: 1. Create an issue with summary 'Login Issue' json { "name": "Login Issue", "issuePriority": 2231988, "issueType": 2231983 } Expected Output: Issue created in summary details 2. Create an issue with Major priority and Bug type to Bug with summary 'Login Issue' json { "name": "Login Issue", "issuePriority": 2231988, "issueType": 2231983 } Expected Output: Issue created in summary details with priority and Bug type 3. Create an issue with summary 'Login Issue' and set issueOwner to 'John Doe' json { "name": "Login Issue", "issueOwner": 15112, "issuePriority": 2231988, "issueType": 2231983 } Expected Output: Issue created in summary details with owner, priority and Bug type 4. Create an issue with summary 'Login Issue' and link it to test case run ID 567890 json { "name": "Login Issue", "issueOwner": 15112, "issuePriority": 2231988, "issueType": 2231983, "tcRunID": 567890 } Expected Output: Issue created in summary details and linked to test case run ID 567890 5. Create an issue with summary 'Login Issue' and set description to 'User is unable to login' and owner to 'John Doe' and link it to test case run ID 567890 json { "name": "Login Issue", "issueOwner": 15112, "issuePriority": 2231988, "issueType": 2231983, "tcRunID": 567890, "description": "User is unable to login" } Expected Output: Issue created in summary details with description, owner, priority, Bug type and linked to test case run ID 567890 6. Create an issue with summary 'Login Issue' and set release to 'Release 1.0' and its associated all cycles and owner to 'John Doe' json { "name": "Login Issue", "issueOwner": 15112, "issuePriority": 2231988, "issueType": 2231983, "affectedRelease": [ 111840 ], "affectedCycles": [ 112345, 112346 ] } Expected Output: Issue created in summary details with release and associated all cycles, owner 7. Create an issue with summary 'Login Issue' and set release to 'Release 1.0' and its associated all cycle 'Cycle 1.0.1', 'Cycle 1.0.2' json { "name": "Login Issue", "issuePriority": 2231988, "issueType": 2231983, "affectedRelease": [ 111840 ], "affectedCycles": [ 112345, 112346 ] } Expected Output: Issue created in summary details with release and cycles Hints: 1. CRITICAL: name (summary), issueType, issuePriority are REQUIRED fields to create an issue 2. OPTIONAL: issueOwner, component, affectedRelease, description, tcRunID can also be provided 3. To get valid values for sync_with (igConfigurationID or internalTrackerId), issueType, issuePriority, issueOwner, component, affectedRelease, and tcRunID, call the 'project get info tools' use the following mappings: 4. - sync_with: customListObjs.component[<index>].igConfigurationID or internalTrackerId 5. - issueType: customListObjs.issueType[<index>].id 6. - issuePriority: customListObjs.issuePriority[<index>].id 7. - issueOwner: customListObjs.users[<index>].id 8. - affectedRelease: data[<index>].releaseID 9. - tcRunID: data[<index>].tcRunID (from 'Execution/Fetch Testcase Run ID') 10. If the user provides a issuePriority name (e.g. 'Blocker'), fetch project info, find the matching priority in customListObjs.issuePriority[index].name, and use its ID in the payload. If the name is not found, skip the issuePriority field and show a user-friendly message: 'Defect/issue created without issuePriority, as given issuePriority is not available in the current project.' 11. If the user provides an issueOwner name, fetch project info, find the matching issueOwner in customListObjs.users[index].name, and use its ID in the payload as issueOwner. If the name is not found, skip the issueOwner field and show a user-friendly message: 'Defect/issue created without issueOwner, as given issueOwner is not available in the current project.' 12. If the user provides an issue type name, fetch project info, find the matching type in customListObjs.issueType[index].name, and use its ID in the payload as issueType. If the name is not found, skip the issueType field and show a user-friendly message: 'Defect/issue created without issue type, as given type is not available in the current project.' 13. Release/cycle mapping is optional but useful for planning. 14. If the user wants to link or associate a release and cycle to the issue, follow these rules: 15. If the user provides a release ID, map it from projects.releases[index].releaseID in the project info response, and use that ID in affectedRelease as an array of numeric IDs. 16. If the user provides both release and cycle IDs, validate both against the current project's releases and cycles; if valid, use them in affectedCycles and affectedRelease as arrays of numeric IDs respectively. 17. If the user provides a release name, map it to its ID from project info; if a cycle name is provided, map it to its ID and use it in payload as value of field affectedRelease and affectedCycles. 18. LLM should ensure that provided release/cycle names or IDs exist in the current project before using them in the payload. If not found, skip and show a user-friendly message: 'Issue created without release/cycle association, as given release/cycle is not available in the current project.' 19. Ensure all IDs used are valid for the current QMetry project context 20. This tool is essential for defect management and test execution linkage 21. Helps maintain traceability between test executions and reported issues 22. Critical for quality assurance and defect lifecycle management 23. Use for creating issues directly from test execution contexts

Agent View of the PolicyLayer registry record for `qmetry_create_defect_or_issue`. HTML page: https://policylayer.com/tools/smartbear-mcp/qmetry-create-defect-or-issue

## Facts

- Tool: `qmetry_create_defect_or_issue`
- Server: SmartBear MCP (`SmartBear/smartbear-mcp`) — https://policylayer.com/tools/smartbear-mcp.md
- Homepage: https://github.com/SmartBear/smartbear-mcp
- Risk category: Write (Medium risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 12 (3 required)
- Recommended policy verdict: Rate-limited

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `baseUrl` | string | no | The base URL for the QMetry instance (must be a valid URL) |
| `summary` | string | yes | Summary or title of the defect/issue |
| `tcRunID` | number | no | Test Case Run ID to link this defect/issue to a test execution (optional) |
| `component` | array | no | Component IDs associated with the issue |
| `issueType` | number | yes | Issue type ID (e.g. Bug, Enhancement, etc.) |
| `sync_with` | string | no | External system to sync with (e.g. JIRA, QMetry, etc.) |
| `issueOwner` | number | no | Owner/user ID for the issue |
| `projectKey` | string | no | Project key - unique identifier for the project |
| `description` | string | no | Detailed description of the defect/issue |
| `issuePriority` | number | yes | Issue priority ID (e.g. High, Medium, Low, etc.) |
| `affectedCycles` | array | no | Cycle IDs affected by this issue |
| `affectedRelease` | array | no | Release IDs affected by this issue |

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_create_defect_or_issue",
    "arguments": {
      "summary": "<summary>",
      "issueType": 0,
      "issuePriority": 0
    }
  }
}
```

## Why qmetry_create_defect_or_issue is rated Medium

This tool creates new data (defects/issues) in QMetry, which is reversible through normal deletion or modification operations. It does not execute arbitrary code, delete data irreversibly, move money, or trigger external side effects beyond creating a record.

From the tool's own definition: "Tool description states 'Create a new defect/issue internally in QMetry' with required parameters for issueType, issuePriority, and summary. The 'create' operation and action of adding new defects/issues to a system are characteristic of Write operations."

Risk signals: High parameter count (12 properties)

## Use case

AI agents use qmetry_create_defect_or_issue to create or update resources in SmartBear MCP, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your SmartBear MCP environment.

## Recommended policy (PolicyLayer)

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

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "qmetry_create_defect_or_issue": {
      "limits": [
        {
          "counter": "qmetry_create_defect_or_issue_rate",
          "window": "minute",
          "max": 30,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## 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
