Skip to main content
Glama
phillipboesger

Polarion MCP Server

getFieldsMetadataForTestRecord

Read-only

Retrieve field definitions, labels, and value types for a specific test record to determine valid keys before writing data.

Instructions

Returns the field definitions that apply to one specific Test Record (one test case execution within a Test Run iteration), 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 Record (one test case execution within a Test Run iteration) 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
iterationYesThe iteration number identifying which repeated occurrence of this item is being addressed (e.g. which run of a test parameter).
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.
testCaseIdYesThe Test Case's ID being referenced.
testCaseProjectIdYesThe project ID that owns the referenced Test Case — may differ from the project in the request path when the test case is shared from another project.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
linksNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.2.0
    • changedInput schema / properties / iteration / description
      Previous value: -"The Iteration Number."New value: +"The iteration number identifying which repeated occurrence of this item is being addressed (e.g. which run of a test parameter)."
    • 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 / testCaseId / description
      Previous value: -"The Testcase ID."New value: +"The Test Case's ID being referenced."
    • changedInput schema / properties / testCaseProjectId / description
      Previous value: -"The Testcase Project ID."New value: +"The project ID that owns the referenced Test Case — may differ from the project in the request path when the test case is shared from another project."
    • 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
Behavior4/5

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

Annotations already provide readOnlyHint and openWorldHint, so the safety profile is covered. The description adds behavioral context beyond those annotations by describing the return structure (keyed by field ID, labels, type kinds, custom fields) and the intended use before a write operation. It could mention pagination or error behavior, but the core behavior is transparent.

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: first the return value, then usage guidance, then alternatives. However, the parenthetical "one test case execution within a Test Run iteration" appears verbatim twice, which is slightly redundant. Otherwise every sentence earns its place and the key scoping information is front-loaded.

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?

With five required parameters, an output schema present, and read-only annotations, the description covers the essential context: what is returned, when to use it, how it differs from related metadata tools, and the scope of the response. It could add a note about field-definition freshness or error scenarios, but overall an agent can call this tool correctly with the information provided.

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% — all five parameters have meaningful descriptions covering project scoping, test run, test case, and iteration. The description adds framing by explaining the composite identity of a Test Record, but it does not substantially expand on individual parameter semantics beyond what the schema already states, so the baseline 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 opens with a precise verb and resource: "Returns the field definitions that apply to one specific Test Record" and elaborates with the exact keying by field ID and type kinds. It further differentiates from siblings by naming the project-wide and global alternatives, making the scope unmistakable.

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?

It explicitly states when to use the tool: "Use it before writing to the Test Record ... to learn which field keys and value types are valid." It also gives exclusions and alternatives: for project-wide definitions use getProjectFieldsMetadata, and for global defaults use getGlobalFieldsMetadata, leaving no ambiguity about when to choose a different tool.

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