Skip to main content
Glama
phillipboesger

Polarion MCP Server

getFieldsMetadataForTestRun

Read-only

Get field labels and value types for a specific Test Run before writing data. Use this to discover valid field keys and custom fields configured for that run.

Instructions

Returns the field definitions that apply to one specific Test Run, keyed by field ID: each field's label and type kind (primitive such as string/date/text/html, list, structure, or enumeration with its enum name), including the custom fields configured for its type. Use it before writing to the Test Run to learn which field keys and value types are valid. For the project-wide definitions of a resource type without a concrete instance, use getProjectFieldsMetadata; for global defaults, getGlobalFieldsMetadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdYesThe Polarion project ID (its URL segment, e.g. `myproject`), case-sensitive. Required to scope the request to one project; call getProjects to list valid IDs.
testRunIdYesThe Test Run's ID within its project.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
linksNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.2.0
    • changedInput schema / properties / projectId / description
      Previous value: -"The Project ID."New value: +"The Polarion project ID (its URL segment, e.g. `myproject`), case-sensitive. Required to scope the request to one project; call getProjects to list valid IDs."
    • changedInput schema / properties / testRunId / description
      Previous value: -"The Test Run ID."New value: +"The Test Run's ID within its project."
  2. Changed1 schema field changedv1.1.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "data": {
      +      "properties": {
      +        "attributes": {
      +          "properties": {
      +            "enumField": {
      +              "properties": {
      +                "label": {
      +                  "example": "field-label",
      +                  "type": "string"
      +                },
      +                "type": {
      +                  "properties": {
      +                    "enumContext": {
      +                      "example": "enum-context",
      +                      "type": "string"
      +                    },
      +                    "enumName": {
      +                      "example": "enum-name",
      +                      "type": "string"
      +                    },
      +                    "kind": {
      +                      "example": "enumeration",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "listField": {
      +              "properties": {
      +                "label": {
      +                  "example": "field-label",
      +                  "type": "string"
      +                },
      +                "type": {
      +                  "properties": {
      +                    "itemType": {
      +                      "properties": {
      +                        "kind": {
      +                          "properties": {
      +                            "enum": {
      +                              "items": {
      +                                "enum": [
      +                                  "string",
      +                                  "text",
      +                                  "text/html",
      +                                  "integer",
      +                                  "float",
      +                                  "currency",
      +                                  "time",
      +                                  "date",
      +                                  "date-time",
      +                                  "boolean",
      +                                  "structure",
      +                                  "relationship"
      +                                ],
      +                                "type": "string"
      +                              },
      +                              "type": "array"
      +                            }
      +                          },
      +                          "type": "object"
      +                        }
      +                      },
      +                      "type": "object"
      +                    },
      +                    "kind": {
      +                      "example": "list",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "primitiveField": {
      +              "properties": {
      +                "label": {
      +                  "example": "field-label",
      +                  "type": "string"
      +                },
      +                "type": {
      +                  "properties": {
      +                    "kind": {
      +                      "properties": {
      +                        "enum": {
      +                          "items": {
      +                            "enum": [
      +                              "string",
      +                              "text",
      +                              "text/html",
      +                              "integer",
      +                              "float",
      +                              "currency",
      +                              "time",
      +                              "date",
      +                              "date-time",
      +                              "boolean"
      +                            ],
      +                            "type": "string"
      +                          },
      +                          "type": "array"
      +                        }
      +                      },
      +                      "type": "object"
      +                    }
      +                  },
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            },
      +            "structField": {
      +              "properties": {
      +                "label": {
      +                  "example": "field-label",
      +                  "type": "string"
      +                },
      +                "type": {
      +                  "properties": {
      +                    "kind": {
      +                      "example": "structure",
      +                      "type": "string"
      +                    },
      +                    "structureName": {
      +                      "example": "structureId",
      +                      "type": "string"
      +                    }
      +                  },
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            }
      +          },
      +          "type": "object"
      +        },
      +        "relationships": {
      +          "properties": {
      +            "relationshipField": {
      +              "properties": {
      +                "label": {
      +                  "example": "field-label",
      +                  "type": "string"
      +                },
      +                "type": {
      +                  "properties": {
      +                    "kind": {
      +                      "example": "relationship",
      +                      "type": "string"
      +                    },
      +                    "multi": {
      +                      "example": true,
      +                      "type": "boolean"
      +                    },
      +                    "targetResourceTypes": {
      +                      "items": {
      +                        "example": "resource-type",
      +                        "type": "string"
      +                      },
      +                      "type": "array"
      +                    }
      +                  },
      +                  "type": "object"
      +                }
      +              },
      +              "type": "object"
      +            }
      +          },
      +          "type": "object"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "links": {
      +      "properties": {
      +        "self": {
      +          "example": "https://example.com/polarion/rest/v1/projects/MyProjectId/actions/getFieldsMetadata?resourceType=MyResourceType&targetType=MyTargetType",
      +          "type": "string"
      +        }
      +      },
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Added

TDQS

A4.3/5.0
Behavior3/5

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

The readOnlyHint and openWorldHint annotations already establish the read-only, dynamic nature of the operation, so the description does not need to restate safety semantics. It adds useful scoping context ('one specific Test Run', custom fields configured for its type), but does not disclose additional behavioral traits such as authentication, rate limits, or response size; the output schema covers return structure.

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

Conciseness5/5

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

The description is compact and front-loaded, with the core return semantics in the first sentence, usage guidance in the second, and sibling-tool differentiation in the third. No sentence is redundant or wasted.

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 two required parameters, full schema coverage, read-only/open-world annotations, and an output schema, this is a complete description. It gives purpose, usage timing, alternatives, and return expectations without requiring the agent to infer missing call context.

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

Parameters3/5

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

Schema description coverage is 100%: both projectId and testRunId have meaningful descriptions in the schema. The tool description does not add parameter-level meaning beyond the schema, so the baseline score of 3 is appropriate.

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 the verb 'Returns' with a specific resource: field definitions for one Test Run. It explains the keying structure, label/type-kind coverage, and custom-field inclusion, and the final sentence distinguishes it from getProjectFieldsMetadata and getGlobalFieldsMetadata.

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 explicitly says to use this tool before writing to a Test Run to learn valid field keys and value types. It also names the alternatives for project-wide and global-field definitions, giving clear routing guidance among sibling tools.

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