Skip to main content
Glama
SmartBear MCP server

SmartBear MCP server

Official
by SmartBear

QMetry: Update Issue

qmetry_update_issue

Update an existing QMetry issue by DefectId and/or entityKey, including summary, priority, type, owner, affected releases/cycles, description, and custom fields.

Instructions

Update an existing QMetry issue by DefectId and/or entityKey.

Toolset: Issues

Parameters:

  • DefectId (number) required: ID of the defect/issue to be updated. CRITICAL: the parameter name is 'DefectId' (capital D) — do NOT use 'defectId', 'issueId', 'id', or other variants. Accepts a string or number.

  • entityKey (string): Entity Key of the defect/issue to be updated

  • issueType (number): Issue type ID (e.g. Bug, Enhancement, etc.)

  • issuePriority (number): Issue priority ID (e.g. High, Medium, Low, etc.)

  • summary (string): Summary or title of the defect/issue

  • description (string): Detailed description of the defect/issue

  • issueOwner (number): Owner/user ID for the issue

  • affectedRelease (number): Release IDs affected by this issue

  • affectedCycles (array): Cycle IDs affected by this issue

  • udfFields (record<string, union>): Flat UDF field values. Keys = UDF field names from 'Fetch UDF Layout'. Values depend on fieldTypeName: STRING/LARGETEXT: string, NUMBER: number, DATETIMEPICKER: date string ('14-08-2026'), LOOKUPLIST: numeric ID, MULTILOOKUPLIST: array of IDs [101, 102], CASCADINGLIST: { parent: 101, child: 102 }. Call 'Fetch UDF Layout' with entityType + pageName='ADD' to discover available fields and list option IDs.

  • UDF (record<string, object>): UDF wrapper required for update. Keys = UDF field names. Each value must include fieldID (from 'Fetch UDF Layout' with pageName='DETAIL') and value.

Output Description: JSON object with update status and details.

Use Cases: 1. Update issue summary (title) 2. Change issue priority, type, or owner 3. Update affected release or cycles 4. Update description or environment 5. Bulk update using DefectId and/or entityKey

Examples:

  1. Update issue summary

{
  "DefectId": 118150,
  "summary": "Money withdrawal is success even if insufficient amount_updated"
}

Expected Output: Issue summary updated successfully.

  1. Update issue priority

{
  "DefectId": 118150,
  "issuePriority": 189340
}

Expected Output: Issue priority updated successfully.

  1. Update issue type

{
  "DefectId": 118150,
  "issueType": 189337
}

Expected Output: Issue type updated successfully.

  1. Update affected release and affected cycles

{
  "DefectId": 118150,
  "affectedRelease": 3730,
  "affectedCycles": [
    1168
  ]
}

Expected Output: Affected release and affected cycles updated successfully.

Hints: 1. === DEFAULT VALUES — APPLY FOR ANY UNSET FIELD === 2. ALWAYS call 'Fetch UDF Layout' with entityType='IS', pageName='DETAIL' before updating. 3. defaultValues (from Fetch UDF Layout, i.e. qmDefaultValue.IS): { fieldName: defaultValueId } — sweep ALL entries. 4. defaultValues can contain BOTH system field defaults AND UDF field defaults — handle each differently: 5. → SYSTEM field defaults (fields in qmSDF.IS, e.g. component/Labels, issueType, issuePriority): route to TOP-LEVEL params, NOT to udfFields. 6. - MULTILOOKUPLIST system fields (e.g. component): default is a single ID — wrap in array: component: [5232632]. 7. - LOOKUPLIST system fields (e.g. issueType, issuePriority): default is a single ID — use directly. 8. → UDF field defaults (fields in qmUDF.IS, e.g. str1, lookup19, age19): route to udfFields param. 9. For EACH key in defaultValues: if user did not explicitly provide that field → include it in payload using default, routed correctly. 10. This applies to non-mandatory fields too (e.g. component/Labels). Omitting them = data loss. 11. IMPORTANT: QMetry's API sometimes returns 'defaultValues: {}' (empty) — if so, skip auto-apply and ask user for mandatory fields without defaults. 12. systemFields (from qmSDF.IS): isMandatory=true fields must retain a valid value after update. 13. IMPORTANT: QMetry's API sometimes returns 'systemFields: []' (empty). If so, treat summary, issueType, issuePriority as always mandatory. 14. fields/UDF (from qmUDF.IS): isMandatory=true UDF fields must be included if being changed. 15. === END DEFAULT VALUES === 16. 17. === DATE FORMAT CHECK (MANDATORY — EVERY UPDATE REQUEST) === 18. ALWAYS call 'Fetch QMetry Project Info' before every update request — not only when the user explicitly mentions a date. 19. Any UDF field could be a DATETIMEPICKER. Wrong format causes QMetry to silently discard the field value (API returns success but value is NOT stored — no error). 20. STEP 1: From project info, read dateTimeFormatID (e.g. 3). 21. STEP 2: Find entry in dateTimeFormatNew where id === dateTimeFormatID → read its unique_value (e.g. 'yyyy-MM-dd'). 22. STEP 3: unique_value pattern: yyyy=4-digit year, MM=2-digit month (01-12), dd=2-digit day, MMM=3-letter month (Jan/Feb/...). 23. Example: id=1 → MM-dd-yyyy → '10-25-2000' | id=2 → dd-MM-yyyy → '25-10-2000' | id=3 → yyyy-MM-dd → '2000-10-25' | id=4 → dd-MMM-yyyy → '25-Oct-2000' 24. STEP 4: For EVERY DATETIMEPICKER field in the payload: parse any user-provided date and re-format it using the active unique_value pattern before sending. 25. NEVER assume a date format — always derive it from dateTimeFormatID. Wrong format = silent data loss. 26. === END DATE FORMAT CHECK === 27. 28. To get the DefectId, call the Issue/Fetch issue tool and use data[].id from the response. 29. if you have pass issue key (VT-IS-5, MAC-IS-10 etc.) then first fetch issue by issue key to get issue id. 30. Along with DefectId, pass only those fields which are to be updated. 31. Refer to the Create Issue tool for valid field mappings and values. 32. You can update summary, priority, type, affectedRelease, affectedCycles, description, sync_with, issueOwner, component, environment, tcRunID, etc. 33. If you provide entityKey, it will be used for additional validation but DefectId is required. 34. 35. UDF (User Defined Fields) WORKFLOW FOR UPDATE: 36. 1. Call 'Fetch UDF Layout' with entityType='IS', pageName='DETAIL' to get field names, fieldIDs (projectUserFieldID), and list option IDs. 37. IF listOptions[field.listName] is empty after Fetch UDF Layout, the tool already tried a metadata fallback. If STILL empty, ask the user to provide the option ID from the QMetry UI — do NOT guess numeric IDs. 38. 2. For LOOKUPLIST fields: pick one ID from listOptions[field.listName][].id. 39. 3. For MULTILOOKUPLIST fields: pick array of IDs; also pass alias flat key (e.g., fieldNameAlias: 'Option Label'). 40. 4. For CASCADINGLIST fields: pick parent ID + fetch child with 'Fetch Cascade Child Values'. Pass { parent: parentId, child: childId }. 41. 5. Pass BOTH 'udfFields' (flat root values) AND 'UDF' wrapper (with fieldID) — both required for update. 42. Example: udfFields: { is_field: 'value' }, UDF: { is_field: { fieldID: 3001, value: 'value' } } 43. 6. Mandatory UDF fields (isMandatory=true) MUST be included.

Input Schema

NameRequiredDescriptionDefault
UDFNoUDF wrapper required for update. Keys = UDF field names. Each value must include fieldID (from 'Fetch UDF Layout' with pageName='DETAIL') and value.
summaryNoSummary or title of the defect/issue
DefectIdYesID of the defect/issue to be updated. CRITICAL: the parameter name is 'DefectId' (capital D) — do NOT use 'defectId', 'issueId', 'id', or other variants. Accepts a string or number.
entityKeyNoEntity Key of the defect/issue to be updated
issueTypeNoIssue type ID (e.g. Bug, Enhancement, etc.)
udfFieldsNoFlat UDF field values. Keys = UDF field names from 'Fetch UDF Layout'. Values depend on fieldTypeName: STRING/LARGETEXT: string, NUMBER: number, DATETIMEPICKER: date string ('14-08-2026'), LOOKUPLIST: numeric ID, MULTILOOKUPLIST: array of IDs [101, 102], CASCADINGLIST: { parent: 101, child: 102 }. Call 'Fetch UDF Layout' with entityType + pageName='ADD' to discover available fields and list option IDs.
issueOwnerNoOwner/user ID for the issue
descriptionNoDetailed description of the defect/issue
issuePriorityNoIssue priority ID (e.g. High, Medium, Low, etc.)
affectedCyclesNoCycle IDs affected by this issue
affectedReleaseNoRelease IDs affected by this issue

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.43.0
    • addedInput schema / properties / affectedCycles / items
      Added value: +{
      +  "type": "number"
      +}
    • changedInput schema / properties / affectedCycles / type
      Previous value: -"number"New value: +"array"
  2. Changed3 schema fields changedv0.37.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / properties / UDF
      Added value: +{
      +  "additionalProperties": {
      +    "properties": {
      +      "fieldID": {
      +        "description": "Numeric field ID (projectUserFieldID) from 'Fetch UDF Layout' with pageName='DETAIL'. Required for update UDF wrapper.",
      +        "exclusiveMinimum": 0,
      +        "maximum": 9007199254740991,
      +        "type": "integer"
      +      },
      +      "value": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "number"
      +          },
      +          {
      +            "items": {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            "type": "array"
      +          },
      +          {
      +            "properties": {
      +              "child": {
      +                "maximum": 9007199254740991,
      +                "minimum": -9007199254740991,
      +                "type": "integer"
      +              },
      +              "parent": {
      +                "maximum": 9007199254740991,
      +                "minimum": -9007199254740991,
      +                "type": "integer"
      +              }
      +            },
      +            "required": [
      +              "parent"
      +            ],
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "description": "UDF value. Type depends on fieldTypeName: STRING/LARGETEXT: string, NUMBER: number, DATETIMEPICKER: 'MM-DD-YYYY' or 'DD-MM-YYYY', LOOKUPLIST: numeric ID, MULTILOOKUPLIST: array of IDs, CASCADINGLIST: { parent, child }."
      +      }
      +    },
      +    "required": [
      +      "fieldID",
      +      "value"
      +    ],
      +    "type": "object"
      +  },
      +  "description": "UDF wrapper required for update. Keys = UDF field names. Each value must include fieldID (from 'Fetch UDF Layout' with pageName='DETAIL') and value.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
    • addedInput schema / properties / udfFields
      Added value: +{
      +  "additionalProperties": {
      +    "anyOf": [
      +      {
      +        "type": "string"
      +      },
      +      {
      +        "type": "number"
      +      },
      +      {
      +        "items": {
      +          "type": "number"
      +        },
      +        "type": "array"
      +      },
      +      {
      +        "properties": {
      +          "child": {
      +            "type": "number"
      +          },
      +          "parent": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "parent"
      +        ],
      +        "type": "object"
      +      },
      +      {
      +        "type": "null"
      +      }
      +    ]
      +  },
      +  "description": "Flat UDF field values. Keys = UDF field names from 'Fetch UDF Layout'. Values depend on fieldTypeName: STRING/LARGETEXT: string, NUMBER: number, DATETIMEPICKER: date string ('14-08-2026'), LOOKUPLIST: numeric ID, MULTILOOKUPLIST: array of IDs [101, 102], CASCADINGLIST: { parent: 101, child: 102 }. Call 'Fetch UDF Layout' with entityType + pageName='ADD' to discover available fields and list option IDs.",
      +  "propertyNames": {
      +    "type": "string"
      +  },
      +  "type": "object"
      +}
  3. First observedv0.27.1

TDQS

A4.3/5.0
Behavior5/5

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

Annotations only declare readOnly=false, destructive=false, idempotent=false, openWorld=false; the description adds substantial behavioral detail beyond that, notably that a wrong date format or omitted default causes SILENT data loss, that mandatory system fields must retain valid values, that both udfFields and the UDF wrapper must be supplied together, and that empty defaultValues/systemFields responses must be handled differently.

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?

Purpose and preconditions are front-loaded, but the body repeats the schema parameter list nearly verbatim, uses four near-identical examples, and buries actionable rules inside 40+ numbered hint lines with '=== BLOCK ===' banners. Considerable text could be cut with no loss of guidance.

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 an 11-parameter mutation tool with nested UDF objects and no output schema, the description covers nearly everything needed: ID acquisition, UDF discovery, date formatting, default-value sweeping, and mandatory field retention. The only real gap is mention of updatable fields absent from the schema, which could mislead an agent into sending them.

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 description coverage is already 100%, so the baseline is 3, but the description adds routing rules the schema cannot express: which defaults go to top-level params versus udfFields, the DefectId capitalization trap, and the dual udfFields/UDF requirement with a concrete side-by-side example. It loses a point for referencing fields (sync_with, component, environment, tcRunID) that do not exist in the input schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening line gives a specific verb and resource ('Update an existing QMetry issue') plus the identifiers used to select the record (DefectId, entityKey). It distinguishes itself from qmetry_create_defect_or_issue by pointing at a Create Issue tool for field mappings, though it never states explicitly 'use the create tool to create, this one to modify'.

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?

Explicit preconditions are given: fetch the issue (via qmetry_fetch_defects_or_issues / issue key) to obtain the DefectId, call 'Fetch UDF Layout' with pageName='DETAIL' before updating, and call 'Fetch QMetry Project Info' to derive the date format. It also says to pass only the fields being updated, which is the key usage constraint.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Deploy Server

Other Tools