Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QMetry: Bulk Update Test Run UDFs

qmetry_bulk_update_test_run_udfs

Bulk update custom field values for multiple test case runs in a single async operation. Specify test run IDs and field values to update text, numbers, dates, single/multi-select, or cascading fields.

Instructions

Bulk update User Defined Field (UDF) values for one or more Test Case Runs in a test execution. Runs asynchronously in the background.

Toolset: UDF

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)

  • tcRunIDs (array) required: Array of Test Case Run IDs to update UDF values for. To get tcRunIDs — Call 'Fetch Test Case Runs by Test Suite Run' tool. From the response, get value of data[].tcRunID. Example: [41572006, 41572009, 41572013]

  • UDF (record<string, object>) required: Object mapping UDF field names to their new values. Each key is the UDF field name (e.g. 'test_env', 'priority_field'). Each value is an object with fieldID and value (and optionally multiSelectAction for multi-select fields). All UDF fields are optional — include only the fields you want to update.

Output Description: JSON object with success status, code 'CO.BULK_TC_EXECUTION_UDF_UPDATE_STARTED', and message confirming the background job was queued.

Use Cases: 1. Bulk update a string UDF (e.g. build version, environment name) for multiple test runs 2. Set a date UDF field (e.g. execution date) across multiple test case runs 3. Update a numeric UDF field (e.g. story points, priority score) in bulk 4. Set a single-select lookup UDF to a new value for multiple runs 5. Append new values to a multi-select UDF field across multiple test runs 6. Replace all existing selections in a multi-select UDF with new values 7. Update a cascading list UDF (parent + child) for multiple test runs 8. Update multiple UDF fields of different types in a single bulk operation 9. Reset a UDF field value for all runs in a test suite execution 10. Sync automated test result metadata (environment, build, platform) into UDF fields after execution

Examples:

  1. Bulk update a STRING UDF for multiple test runs

{
  "tcRunIDs": [
    41572006,
    41572009,
    41572013
  ],
  "UDF": {
    "8190_String": {
      "fieldID": 229241,
      "value": "regression-v2.1"
    }
  }
}

Expected Output: Bulk updates to execution UDF values will run in the background. Go to 'Scheduled Task' to track the process.

  1. Bulk update a DATE UDF field for multiple test runs (MM-DD-YYYY format)

{
  "tcRunIDs": [
    41572006,
    41572009
  ],
  "UDF": {
    "KN_DATE": {
      "fieldID": 229255,
      "value": "06-20-2026"
    }
  }
}

Expected Output: Bulk updates to execution UDF values will run in the background.

  1. Bulk update a NUMBER UDF field for multiple test runs

{
  "tcRunIDs": [
    41572006,
    41572009,
    41572013,
    41572015
  ],
  "UDF": {
    "defaultNum": {
      "fieldID": 229003,
      "value": 5
    }
  }
}

Expected Output: Bulk updates to execution UDF values will run in the background.

  1. Bulk update a single-select LOOKUPLIST UDF for multiple test runs

{
  "tcRunIDs": [
    41572006,
    41572009
  ],
  "UDF": {
    "8260LUP": {
      "fieldID": 228563,
      "value": 5108697
    }
  }
}

Expected Output: Bulk updates to execution UDF values will run in the background.

  1. Bulk update a MULTILOOKUPLIST UDF — APPEND new values to existing selections

{
  "tcRunIDs": [
    41572006,
    41572009,
    41572013
  ],
  "UDF": {
    "m_selections": {
      "fieldID": 229223,
      "value": [
        5158524,
        5158525
      ],
      "multiSelectAction": "append"
    }
  }
}

Expected Output: Bulk updates to execution UDF values will run in the background.

  1. Bulk update a MULTILOOKUPLIST UDF — REPLACE existing selections with new values

{
  "tcRunIDs": [
    41572006,
    41572009
  ],
  "UDF": {
    "mullt_env": {
      "fieldID": 229425,
      "value": [
        5108697,
        5108698
      ],
      "multiSelectAction": "replace"
    }
  }
}

Expected Output: Bulk updates to execution UDF values will run in the background.

  1. Bulk update a CASCADINGLIST UDF (parent + child) for multiple test runs

{
  "tcRunIDs": [
    41572006,
    41572009,
    41572013
  ],
  "UDF": {
    "cascade_mcp": {
      "fieldID": 229426,
      "value": {
        "parent": 5126498,
        "child": 5126499
      }
    }
  }
}

Expected Output: Bulk updates to execution UDF values will run in the background.

  1. Bulk update multiple UDF fields of different types in a single operation

{
  "tcRunIDs": [
    41572006,
    41572009,
    41572013,
    41572015,
    41579875
  ],
  "UDF": {
    "8190_String": {
      "fieldID": 229241,
      "value": "smoke-test"
    },
    "KN_DATE": {
      "fieldID": 229255,
      "value": "06-20-2026"
    },
    "defaultNum": {
      "fieldID": 229003,
      "value": 3
    },
    "8260LUP": {
      "fieldID": 228563,
      "value": 5108697
    },
    "m_selections": {
      "fieldID": 229223,
      "value": [
        5158524,
        5158525
      ],
      "multiSelectAction": "append"
    },
    "mullt_env": {
      "fieldID": 229425,
      "value": [
        5108697,
        5108698
      ],
      "multiSelectAction": "replace"
    },
    "cascade_mcp": {
      "fieldID": 229426,
      "value": {
        "parent": 5126498,
        "child": 5126499
      }
    }
  }
}

Expected Output: Bulk updates to execution UDF values will run in the background. Go to 'Scheduled Task' to track the process.

Hints: 1. REQUIRED: 'tcRunIDs' must be a non-empty array of numeric Test Case Run IDs. Get IDs from 'Fetch Test Case Runs by Test Suite Run' tool → data[].tcRunID. 2. REQUIRED: 'UDF' must be an object with at least one field entry. Each key is the UDF field name; each value has 'fieldID' and 'value'. 3. VALUE FORMATS by field type: STRING: plain string, e.g. 'regression-build' NUMBER: number, e.g. 3 DATETIMEPICKER: date string in MM-DD-YYYY format, e.g. '06-20-2026' LOOKUPLIST (single select): numeric item ID, e.g. 5108697 MULTILOOKUPLIST (multi-select): array of item IDs, e.g. [5158524, 5158525] CASCADINGLIST: object with parent and child keys, e.g. {parent: 5126498, child: 5126499}. To get valid child IDs for a CASCADINGLIST field — first call 'Fetch Test Run UDF Metadata' to get the parent item IDs from lookupOptions, then call 'Fetch Cascade Child Values' with a parent item ID to get the available child IDs, then use {parent: , child: } as the value here. 4. MULTILOOKUPLIST — multiSelectAction rules: 'append' (default): new values are ADDED to existing selections. Use when user says 'add', 'include', 'append'. 'replace': existing selections are CLEARED and replaced with only the new values. Use when user says 'replace', 'set to', 'overwrite', 'change to'. If user does not specify, ALWAYS default to 'append'. Never assume 'replace'. 5. MULTILOOKUPLIST — apply multiSelectAction per field individually. Different multi-select fields in the same request can have different multiSelectAction values. 6. DATE FORMAT: Always use MM-DD-YYYY format for DATETIMEPICKER fields (e.g. '06-20-2026', not '2026-06-20'). Convert from any user-supplied date format before calling the tool. 7. ASYNC OPERATION: This API runs in the background. The success response means the job was queued, not that it completed. Tell the user to check 'Scheduled Task' in QMetry UI to track completion. 8. CRITICAL — FIELD IDs: The 'fieldID' for each UDF entry MUST be the exact numeric ID from QMetry's UDF definition — do NOT guess, infer, or fabricate fieldIDs. If the user has not provided a fieldID, ask the user to supply it or look it up in QMetry admin settings before calling this tool. Using a wrong fieldID will silently fail or update the wrong field. 9. CRITICAL — WORKFLOW: When user asks to bulk-update a UDF across all executions of a test suite run (e.g. tsRunID 731600), ALWAYS call 'Fetch Test Case Runs by Test Suite Run' first with that tsRunID to collect ALL tcRunIDs from the response (data[].tcRunID), THEN call this tool. Never skip the fetch step or hard-code tcRunIDs. 10. ALL UDF FIELDS ARE OPTIONAL: Only include the UDF fields the user wants to update. Do not include fields with no change. 11. tcRunIDs vs entityIDs: This tool uses 'tcRunIDs' (array of numbers). Do NOT confuse with 'Bulk Update Test Case Execution Status' which uses 'entityIDs' (comma-separated string).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
UDFYesObject mapping UDF field names to their new values. Each key is the UDF field name (e.g. 'test_env', 'priority_field'). Each value is an object with fieldID and value (and optionally multiSelectAction for multi-select fields). All UDF fields are optional — include only the fields you want to update.
baseUrlNoThe base URL for the QMetry instance (must be a valid URL)
tcRunIDsYesArray of Test Case Run IDs to update UDF values for. To get tcRunIDs — Call 'Fetch Test Case Runs by Test Suite Run' tool. From the response, get value of data[<index>].tcRunID. Example: [41572006, 41572009, 41572013]
projectKeyNoProject key - unique identifier for the projectdefault
Behavior5/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false. The description adds key behavioral details: the operation is asynchronous ('runs in the background'), the response confirms queuing (not completion), and instructs users to check 'Scheduled Task' for progress. It also explains append/replace behavior for multi-select UDFs. No contradictions with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

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

The description is well-structured with clear sections (use cases, examples, hints) but is very verbose. It contains 10 examples that are largely redundant, showing minimal variation. While thorough, it could be more concise without losing essential information.

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?

Given the absence of an output schema, the description provides a clear output description (success status, code, message). It covers the async nature, prerequisite workflow (fetch tcRunIDs first), and per-field behavior comprehensively. All necessary context for correct tool invocation is present.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 100% schema description coverage, the description adds substantial value: detailed examples for each UDF type, value formatting rules, critical emphasis on fieldID accuracy, and per-field multiSelectAction defaults. This goes well beyond the schema's baseline, making parameter usage clear and actionable.

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?

The description clearly states 'Bulk update User Defined Field (UDF) values for one or more Test Case Runs in a test execution. Runs asynchronously in the background.' This provides a specific verb and resource, and hint #11 explicitly distinguishes from the sibling tool 'Bulk Update Test Case Execution Status' by noting parameter differences (tcRunIDs vs entityIDs).

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?

The description offers extensive guidance: 10 use cases, workflow hints (e.g., always fetch tcRunIDs first using Fetch Test Case Runs by Test Suite Run), and hints on when to use append vs replace for multi-select UDFs. Hint #11 directly contrasts with a sibling tool, providing clear when-to-use and when-not-to-use context.

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