Skip to main content
Glama

getFieldsMetadataForTestRun

Read-only

Retrieve valid field IDs, labels, and value types for a specific Test Run, including custom fields, so you can write correct data without guessing.

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

NameRequiredDescriptionDefault
projectIdYesThe Polarion project ID (its URL segment, e.g. `myproject`), case-sensitive. Required to scope the request to one project. If the ID is unknown, ask the user; getProjects lists IDs only with global read access.
testRunIdYesThe Test Run's ID within its project.
response_formatNoResponse detail level. concise removes redundant HTML and JSON:API metadata and may use a small default fieldset on large lists; detailed preserves the complete response. Defaults to detailed.detailed

Output Schema

NameRequiredDescriptionDefault
dataNo
linksNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv1.4.4
    • changedInput schema / properties / projectId / description
      Previous 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."New value: +"The Polarion project ID (its URL segment, e.g. `myproject`), case-sensitive. Required to scope the request to one project. If the ID is unknown, ask the user; getProjects lists IDs only with global read access."
  2. Changed1 schema field changedv1.4.0
    • addedInput schema / properties / response_format
      Added value: +{
      +  "default": "detailed",
      +  "description": "Response detail level. concise removes redundant HTML and JSON:API metadata and may use a small default fieldset on large lists; detailed preserves the complete response. Defaults to detailed.",
      +  "enum": [
      +    "concise",
      +    "detailed"
      +  ],
      +  "type": "string"
      +}
  3. Changed54 schema fields changedv1.3.1
    • removedOutput schema / properties / data / properties / attributes / properties / enumField / properties / label / example
      Removed value: -"field-label"
    • changedOutput schema / properties / data / properties / attributes / properties / enumField / properties / label / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / enumField / properties / type / properties / enumContext / example
      Removed value: -"enum-context"
    • changedOutput schema / properties / data / properties / attributes / properties / enumField / properties / type / properties / enumContext / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / enumField / properties / type / properties / enumName / example
      Removed value: -"enum-name"
    • changedOutput schema / properties / data / properties / attributes / properties / enumField / properties / type / properties / enumName / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / enumField / properties / type / properties / kind / example
      Removed value: -"enumeration"
    • changedOutput schema / properties / data / properties / attributes / properties / enumField / properties / type / properties / kind / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / enumField / properties / type / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / enumField / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / listField / properties / label / example
      Removed value: -"field-label"
    • changedOutput schema / properties / data / properties / attributes / properties / listField / properties / label / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / listField / properties / type / properties / itemType / properties / kind / properties / enum / items / enum
      Removed value: -[
      -  "string",
      -  "text",
      -  "text/html",
      -  "integer",
      -  "float",
      -  "currency",
      -  "time",
      -  "date",
      -  "date-time",
      -  "boolean",
      -  "structure",
      -  "relationship"
      -]
    • changedOutput schema / properties / data / properties / attributes / properties / listField / properties / type / properties / itemType / properties / kind / properties / enum / items / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / listField / properties / type / properties / itemType / properties / kind / properties / enum / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / listField / properties / type / properties / itemType / properties / kind / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / listField / properties / type / properties / itemType / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / listField / properties / type / properties / kind / example
      Removed value: -"list"
    • changedOutput schema / properties / data / properties / attributes / properties / listField / properties / type / properties / kind / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / listField / properties / type / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / listField / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / primitiveField / properties / label / example
      Removed value: -"field-label"
    • changedOutput schema / properties / data / properties / attributes / properties / primitiveField / properties / label / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / primitiveField / properties / type / properties / kind / properties / enum / items / enum
      Removed value: -[
      -  "string",
      -  "text",
      -  "text/html",
      -  "integer",
      -  "float",
      -  "currency",
      -  "time",
      -  "date",
      -  "date-time",
      -  "boolean"
      -]
    • changedOutput schema / properties / data / properties / attributes / properties / primitiveField / properties / type / properties / kind / properties / enum / items / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / primitiveField / properties / type / properties / kind / properties / enum / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / primitiveField / properties / type / properties / kind / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / primitiveField / properties / type / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / primitiveField / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / structField / properties / label / example
      Removed value: -"field-label"
    • changedOutput schema / properties / data / properties / attributes / properties / structField / properties / label / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / structField / properties / type / properties / kind / example
      Removed value: -"structure"
    • changedOutput schema / properties / data / properties / attributes / properties / structField / properties / type / properties / kind / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / attributes / properties / structField / properties / type / properties / structureName / example
      Removed value: -"structureId"
    • changedOutput schema / properties / data / properties / attributes / properties / structField / properties / type / properties / structureName / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / structField / properties / type / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / properties / structField / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / attributes / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / label / example
      Removed value: -"field-label"
    • changedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / label / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / type / properties / kind / example
      Removed value: -"relationship"
    • changedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / type / properties / kind / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / type / properties / multi / example
      Removed value: -true
    • changedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / type / properties / multi / type
      Previous value: -"boolean"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • removedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / type / properties / targetResourceTypes / items / example
      Removed value: -"resource-type"
    • changedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / type / properties / targetResourceTypes / items / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / type / properties / targetResourceTypes / type
      Previous value: -"array"New value: +[
      +  "array",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / relationships / properties / relationshipField / properties / type / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / relationships / properties / relationshipField / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / properties / relationships / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • changedOutput schema / properties / data / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
    • removedOutput schema / properties / links / properties / self / example
      Removed value: -"https://example.com/polarion/rest/v1/projects/MyProjectId/actions/getFieldsMetadata?resourceType=MyResourceType&targetType=MyTargetType"
    • changedOutput schema / properties / links / properties / self / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "number",
      +  "integer",
      +  "boolean",
      +  "null"
      +]
    • changedOutput schema / properties / links / type
      Previous value: -"object"New value: +[
      +  "object",
      +  "null"
      +]
  4. 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."
  5. 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"
      +}
  6. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description adds genuinely new behavioral context by disclosing that results include custom fields configured for the Test Run's type, which affects interpretation of the response. It does not discuss response_format's trade-offs, but the schema documents that parameter, so this is a minor omission rather than a gap.

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?

Three front-loaded sentences with no filler: capability, then usage motivation, then sibling routing. Slightly dense in the first sentence due to the parenthetical type enumeration, but every clause contributes to correct invocation.

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?

For a read-only metadata lookup with an output schema present, the description does everything needed: it explains what the response contains at a conceptual level, when to call it, and which sibling to use otherwise. No essential decision input is missing.

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 coverage is 100%, so all three parameters (including the response_format enum) are documented in structured fields. The description reinforces that the output is keyed by field ID and scoped to one instance, but adds no syntax or value guidance for projectId/testRunId beyond what the schema already says. Baseline 3 applies when the schema carries the load.

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 specific verb and resource: it returns field definitions for one concrete Test Run, keyed by field ID, and enumerates the shape of each entry (label, type kind, list/structure/enum with enum name). It also names the two sibling metadata tools it is not, so an agent can distinguish it from getProjectFieldsMetadata and getFieldsMetadataForTestRecord/Plan/Document without opening schemas.

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 states an explicit when-to-use rule ('Use it before writing to the Test Run to learn which field keys and value types are valid') and gives the disambiguation conditions for both alternatives: project-wide vs concrete instance, and global defaults. Nothing about tool selection is left to inference.

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