Skip to main content
Glama

Trace work item links

trace_links
Read-onlyIdempotent

Builds a bounded, cycle-safe trace tree from a Polarion Work Item across multiple link levels, with direction and depth caps, returning nodes, edges, and truncation status.

Instructions

Builds a bounded, cycle-safe trace tree from one Work Item and returns {nodes, edges, truncated}. Requires a project ID and Work Item ID readable by the signed-in Polarion user. Use this to traverse multiple link levels; use getLinkedWorkItems or getBacklinkedWorkItems for a single hop. direction selects outgoing, incoming, or both; the result is marked truncated when the depth or node cap limits traversal.

Input Schema

NameRequiredDescriptionDefault
depthNoMaximum number of link hops from the root; defaults to 3 and is capped at 6.
rolesNoOptional allowlist of link role IDs; omitted means include every role.
node_capNoMaximum number of distinct Work Items to include; defaults to 200 and is capped at 1000.
directionNo`down` follows outgoing links, `up` follows backlinks, and `both` traverses both directions; defaults to `both`.both
projectIdYesProject ID that owns the root Work Item, such as `PROJECT`.
workItemIdYesRoot Work Item ID within the project, such as `WI-123`, without the project prefix.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.4.4
    • addedInput schema / properties / depth / description
      Added value: +"Maximum number of link hops from the root; defaults to 3 and is capped at 6."
    • addedInput schema / properties / direction / description
      Added value: +"`down` follows outgoing links, `up` follows backlinks, and `both` traverses both directions; defaults to `both`."
    • addedInput schema / properties / node_cap / description
      Added value: +"Maximum number of distinct Work Items to include; defaults to 200 and is capped at 1000."
    • addedInput schema / properties / projectId / description
      Added value: +"Project ID that owns the root Work Item, such as `PROJECT`."
    • addedInput schema / properties / roles / description
      Added value: +"Optional allowlist of link role IDs; omitted means include every role."
    • addedInput schema / properties / roles / items / description
      Added value: +"Exact Polarion link role ID to retain."
    • addedInput schema / properties / workItemId / description
      Added value: +"Root Work Item ID within the project, such as `WI-123`, without the project prefix."
  2. Addedv1.4.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, and open-world behavior. The description adds important context beyond annotations: traversal is bounded and cycle-safe, requires a readable project and Work Item, and marks results truncated when depth or node caps limit traversal.

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 three dense sentences with no waste. It is front-loaded with the core operation and return shape, then follows with prerequisites, alternatives, and traversal semantics.

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?

It covers the operation, required access context, return shape, traversal limits, truncation behavior, and sibling alternatives. For a read-only graph traversal tool with full schema coverage and no output schema, this is complete enough for correct selection and invocation.

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 coverage is 100%, so the parameters are already well documented. The description still adds useful semantics by explaining how `direction` maps to outgoing/incoming/both traversal and that depth/node caps can produce a truncated result.

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 states a specific verb and resource: it builds a bounded, cycle-safe trace tree from one Work Item. It also names the exact return shape `{nodes, edges, truncated}`, making the tool's purpose concrete and distinguishable from simpler link getters.

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 says to use this tool to traverse multiple link levels and names `getLinkedWorkItems` and `getBacklinkedWorkItems` as the alternatives for a single hop. The `direction` option further clarifies outgoing, incoming, or both traversal.

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