Skip to main content
Glama

getFieldsMetadataForTestRecord

Read-only

Returns field definitions for a specific Test Record, including valid field IDs, labels, types, and custom fields, so you can write values correctly.

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

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. If the ID is unknown, ask the user; getProjects lists IDs only with global read access.
testRunIdYesThe Test Run's ID within its project.
testCaseIdYesThe Test Case's ID being referenced.
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
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

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. 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."
  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.3/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is conveyed structurally. The description adds that results include custom fields configured for the record's type and that values are grouped by field ID and type kind — useful, but it says nothing about permission requirements, behavior when the record or iteration does not exist, or scoping failures. Against annotation-covered safety, this is adequate rather than rich.

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?

Purpose and keying are front-loaded, and the alternative-tool routing closes efficiently. The parenthetical 'one test case execution within a Test Run iteration' is repeated twice, which is wasted space in an otherwise tight definition.

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 an output schema present and full schema coverage, the description need not explain return values, and it covers purpose, timing, and alternatives. The only residual gap is behavior on invalid or missing record identity, which is minor given the well-described parameters.

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

Parameters4/5

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

Schema description coverage is 100%, so baseline is 3; the description goes slightly further by glossing the compound identity of the record ('one test case execution within a Test Run iteration'), which frames why testRunId, testCaseId and iteration are all required. It adds no syntax or format detail beyond the schema, so it does not earn a 5.

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?

States a specific verb and resource ('Returns the field definitions that apply to one specific Test Record'), specifies the keying ('keyed by field ID'), and enumerates what is returned: labels, type kinds, custom fields. It is clearly distinguishable from the batch siblings getProjectFieldsMetadata and getGlobalFieldsMetadata, which it names.

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?

Gives explicit timing ('Use it before writing to the Test Record to learn which field keys and value types are valid') and names the two alternatives with the condition that selects them (project-wide definitions vs. global defaults). Nothing 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