Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QMetry: Create Defect or Issue

qmetry_create_defect_or_issue

Creates a new defect or issue in QMetry to track bugs, enhancements, and link them to test executions for traceability.

Instructions

Create a new defect/issue internally in QMetry.

Toolset: Issues

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)

  • 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'

{
  "name": "Login Issue",
  "issuePriority": 2231988,
  "issueType": 2231983
}

Expected Output: Issue created in summary details

  1. Create an issue with Major priority and Bug type to Bug with summary 'Login Issue'

{
  "name": "Login Issue",
  "issuePriority": 2231988,
  "issueType": 2231983
}

Expected Output: Issue created in summary details with priority and Bug type

  1. Create an issue with summary 'Login Issue' and set issueOwner to 'John Doe'

{
  "name": "Login Issue",
  "issueOwner": 15112,
  "issuePriority": 2231988,
  "issueType": 2231983
}

Expected Output: Issue created in summary details with owner, priority and Bug type

  1. Create an issue with summary 'Login Issue' and link it to test case run ID 567890

{
  "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

  1. 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

{
  "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

  1. Create an issue with summary 'Login Issue' and set release to 'Release 1.0' and its associated all cycles and owner to 'John Doe'

{
  "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

  1. 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'

{
  "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[].igConfigurationID or internalTrackerId 5. - issueType: customListObjs.issueType[].id 6. - issuePriority: customListObjs.issuePriority[].id 7. - issueOwner: customListObjs.users[].id 8. - affectedRelease: data[].releaseID 9. - tcRunID: data[].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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
baseUrlNoThe base URL for the QMetry instance (must be a valid URL)
summaryYesSummary or title of the defect/issue
tcRunIDNoTest Case Run ID to link this defect/issue to a test execution (optional)
componentNoComponent IDs associated with the issue
issueTypeYesIssue type ID (e.g. Bug, Enhancement, etc.)
sync_withNoExternal system to sync with (e.g. JIRA, QMetry, etc.)
issueOwnerNoOwner/user ID for the issue
projectKeyNoProject key - unique identifier for the projectdefault
descriptionNoDetailed description of the defect/issue
issuePriorityYesIssue priority ID (e.g. High, Medium, Low, etc.)
affectedCyclesNoCycle IDs affected by this issue
affectedReleaseNoRelease IDs affected by this issue
Behavior5/5

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

Annotations indicate a non-read-only, non-destructive mutation. Description adds creation behavior, required fields, output details (id, dfid), and extensive mapping logic for IDs. 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.

Conciseness3/5

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

Well-structured with sections (Parameters, Output, Use Cases, Examples, Hints) but overly verbose with repetitive examples and excessive hints (23 items). Could be more concise.

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?

Extremely comprehensive for a complex tool with 12 parameters. Covers required vs optional, ID mapping, error handling, linking to other tools, and provides multiple examples. No output schema, but description explains return value.

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 covers all parameters with descriptions (100% coverage). Description adds significant value through hints that explain how to map user-friendly names to IDs and handle missing values, going beyond schema.

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?

Clearly states 'Create a new defect/issue internally in QMetry.' The verb 'Create' and resource 'defect/issue' are specific. It distinguishes from sibling tools like qmetry_update_issue by focusing on creation.

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 clear context for creation and references other tools for fetching project info. Does not explicitly state when not to use or compare with alternatives, but the use cases and hints imply appropriate usage.

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