Skip to main content
Glama
SmartBear

SmartBear MCP server

Official
by SmartBear

QMetry: Fetch Test Run UDF Values

qmetry_fetch_test_run_udf_values
Read-onlyIdempotent

Fetch Test Run UDF values for all test case runs in a test suite run, enriched with field labels and types. Returns a unified table combining default fields with UDF columns.

Instructions

Fetch the Test Run UDF (User Defined Field) values for all test case runs in a given test suite run. Returns each run's UDF values enriched with field label and type information from metadata. Use this tool for test suite run UDF values (sourceContext='testSuiteRun'). Do NOT use this tool for test case executions — 'Fetch Test Case Executions' already calls metadata internally and returns 'testRunUdfs' in every execution row.

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)

  • tsrunID (string): Test Suite Run ID. CRITICAL: the parameter name is 'tsrunID' — do NOT use 'testSuiteRunId', 'tsRunID', or any other variant. Accepts a string or number (e.g. 731600 or '731600' — both are valid). Get this from 'Fetch Executions by Test Suite' → use data[].tsRunID from the response. Required when sourceRows is not provided.

  • viewId (number): View ID for the test execution list (latestViews.TE.viewId from project info). Auto-resolved from project info when omitted. Required when sourceRows is not provided.

  • sourceContext (enum): Which parent tool produced sourceRows. Use 'testSuiteRun' for Fetch Test Case Runs by Test Suite Run. Do NOT use this tool for Fetch Test Case Executions — that tool calls metadata internally and returns testRunUdfs on every execution row; use that data directly. Do NOT use this tool for Fetch Issue Executions; that tool already reads udfjson and enriches it with metadata. (default: "testSuiteRun")

  • sourceRows (array): Optional rows already returned by Fetch Test Case Runs by Test Suite Run. The UDF tool will reuse these rows, enrich/pivot UDF values, and preserve identification fields instead of making the same execution-list API call again. Do NOT pass Fetch Test Case Executions rows here — those rows already have testRunUdfs enriched. Do not pass issue execution rows here; use Fetch Issue Executions output directly for issue UDFs.

  • startIndex (number): Zero-based start index for pagination (default: 0). (default: 0)

  • size (number): Number of test case runs to return per page (default: 50). (default: 50)

Output Description: JSON with hasTcRunUdf boolean, sourceContext, total count, defaultColumns, udfColumns, unifiedTableRows, runs array, and availableUdfFields array describing all UDF fields in the project. Render unifiedTableRows directly as the final table: default identification fields first, then one column per UDF label.

Use Cases: 1. Show me the UDF values for all runs in test suite run 731600 2. What is the planned execution date set on each run in this test cycle? 3. List the Test Run UDF values for test suite run 87039 4. Fetch test run UDFs of executions for tsRunID 731600

Examples:

  1. Fetch UDF values for all runs in test suite run 731600

{
  "tsrunID": "731600",
  "sourceContext": "testSuiteRun"
}

Expected Output: Present as ONE unified table — never as a separate type+value breakdown. Example: | Test Case Key | Test Case Summary | Executed Version | Execution Status | Tested By | Environments UDF | Execution Type | Country | | MAC-TC-5 | Login - valid credential | 1 | Passed | varis | chrome, edge, safari | Functional | India > i3 | | MAC-TC-6 | Login - invalid password | 2 | Failed | john | firefox | Regression | - | Columns: Test Case Key (entityKey) | Test Case Summary (summary) | Executed Version (latestVersion) | Execution Status (runStatus) | Tested By | then one column per UDF label. Use the UDF 'label' as column header. Show null UDF values as '-'.

Hints: 1. DEFAULT DISPLAY CONTRACT: Always render 'unifiedTableRows' as ONE table. Do not render UDFs as Label | Type | Value rows. 2. When sourceContext='testSuiteRun', mandatory columns are: Test Case Key | Test Case Summary | Executed Version | Execution Status | Tested By | then one column per UDF label. 3. PARENT-TO-UDF WORKFLOW: If Fetch Test Case Runs by Test Suite Run was already called, pass parentResponse.data as sourceRows with sourceContext='testSuiteRun'. This preserves identification fields and avoids repeating the same API call. 4. For prompts like 'Fetch test case runs of VKMCP-TS-1 and its Test Run UDFs': call Fetch Test Case Runs by Test Suite Run, then call this tool with sourceContext='testSuiteRun' and sourceRows=. 5. For prompts like 'Fetch Test Case Executions and show Test Run UDFs': call Fetch Test Case Executions ONLY — that tool already calls metadata internally and returns testRunUdfs on every execution row. Do NOT call this tool for test case executions. 6. For prompts like 'Fetch Issue Executions and Test Run UDFs': call Fetch Issue Executions only. Do not call this tool, because issue UDF values come from /rest/execution/getExecutionsForIssue udfjson and are already enriched by the issue tool with metadata. 7. If no parent rows are available, use 'tsrunID' from the 'Fetch Executions by Test Suite' tool (data[].tsRunID field). 8. 'viewId' is auto-resolved from latestViews.TE.viewId — leave blank unless explicitly overriding. It is only needed when sourceRows is not supplied. 9. If 'hasTcRunUdf' is false in the response, no Test Run UDFs are configured for this project. 10. The 'testRunUdfs' array on each run contains enriched UDF values with label and fieldID — use fieldID from here when calling 'Bulk Update Test Run UDFs'. 11. This tool calls UDF metadata internally — no need to call 'Fetch Test Run UDF Metadata' separately when viewing values. 12. When sourceRows is omitted, this tool also calls the test-suite-run execution list API internally. When sourceRows is provided, it reuses those rows and does not refetch the parent execution list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sizeNoNumber of test case runs to return per page (default: 50).
viewIdNoView ID for the test execution list (latestViews.TE.viewId from project info). Auto-resolved from project info when omitted. Required when sourceRows is not provided.
baseUrlNoThe base URL for the QMetry instance (must be a valid URL)
tsrunIDNoTest Suite Run ID. CRITICAL: the parameter name is 'tsrunID' — do NOT use 'testSuiteRunId', 'tsRunID', or any other variant. Accepts a string or number (e.g. 731600 or '731600' — both are valid). Get this from 'Fetch Executions by Test Suite' → use data[<index>].tsRunID from the response. Required when sourceRows is not provided.
projectKeyNoProject key - unique identifier for the projectdefault
sourceRowsNoOptional rows already returned by Fetch Test Case Runs by Test Suite Run. The UDF tool will reuse these rows, enrich/pivot UDF values, and preserve identification fields instead of making the same execution-list API call again. Do NOT pass Fetch Test Case Executions rows here — those rows already have testRunUdfs enriched. Do not pass issue execution rows here; use Fetch Issue Executions output directly for issue UDFs.
startIndexNoZero-based start index for pagination (default: 0).
sourceContextNoWhich parent tool produced sourceRows. Use 'testSuiteRun' for Fetch Test Case Runs by Test Suite Run. Do NOT use this tool for Fetch Test Case Executions — that tool calls metadata internally and returns testRunUdfs on every execution row; use that data directly. Do NOT use this tool for Fetch Issue Executions; that tool already reads udfjson and enriches it with metadata.testSuiteRun
Behavior5/5

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

Discloses behavioral traits beyond annotations: enriches with field label/type, can reuse sourceRows to avoid extra API calls, calls UDF metadata internally, and describes output structure. Aligns with readOnlyHint and idempotentHint.

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?

Fairly long but well-structured with sections (parameters, output, use cases, examples, hints). Front-loaded with main purpose. Some repetition in warnings, but necessary for clarity.

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 high complexity (8 params, sibling relationships, no output schema), the description is extremely complete: covers output structure, multiple use cases, examples, and 12 hints addressing edge cases and workflows.

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?

Adds significant value beyond schema descriptions: warns about exact parameter name 'tsrunID', accepts string or number, explains how to derive from other tools, clarifies sourceContext default and usage, and warns against passing incorrect sourceRows. Schema coverage already 100%.

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 it fetches Test Run UDF values for test case runs in a test suite run, uses specific verb 'Fetch' and resource, and distinguishes from siblings by explicitly stating when not to use (e.g., not for test case executions).

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?

Provides explicit when-to-use (sourceContext='testSuiteRun') and when-not-to-use (test case executions, issue executions). Mentions alternatives like using Fetch Test Case Executions directly. Very clear guidance.

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