Skip to main content
Glama

p6_get_relationships

Read-onlyIdempotent

Retrieve paginated predecessor and successor relationships for a Primavera P6 activity, including lag days, conversion rules, and selectable fields for focused schedule analysis.

Instructions

Relationships of an activity, one page: {total, offset, returned, next_offset, rows, lag_rule}. direction: pred, succ or both. Lag in days (lag_d; explain=True adds lag_h in hours); lag_rule tells which calendar converts lag days (project schedule option, predecessor calendar by default). fields= keeps task_pred_id and the keys named.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "project": "<project>",
      "task_code": "<task_code>"
    },
    "name": "p6_get_relationships"
  }
}

Input Schema

NameRequiredDescriptionDefault
limitNoRows per page (max 200).
detailNobrief (default): rows without null values; full: every key.brief
fieldsNoRow keys to keep (ID keys always kept); default all.
offsetNoRows to skip (next_offset of the previous page).
explainNoTrue: also return the fixed texts in words (see the description).
projectYesProject ID (p6_list_projects).
directionNoboth
task_codeYesActivity ID (task_code).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv4.2.0
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "brief",
      +  "description": "brief (default): rows without null values; full: every key.",
      +  "enum": [
      +    "full",
      +    "brief"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / explain
      Added value: +{
      +  "default": false,
      +  "description": "True: also return the fixed texts in words (see the description).",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / fields
      Added value: +{
      +  "description": "Row keys to keep (ID keys always kept); default all.",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • changedInput schema / properties / limit / default
      Previous value: -100New value: +50
    • changedInput schema / properties / offset / description
      Previous value: -"Rows to skip: pass next_offset from the previous page."New value: +"Rows to skip (next_offset of the previous page)."
    • changedInput schema / properties / project / description
      Previous value: -"Project ID as shown in P6 (p6_list_projects)."New value: +"Project ID (p6_list_projects)."
  2. Changed6 schema fields changedv3.5.0
    • removedInput schema / properties / direction / title
      Removed value: -"Direction"
    • removedInput schema / properties / limit / title
      Removed value: -"Limit"
    • removedInput schema / properties / offset / title
      Removed value: -"Offset"
    • removedInput schema / properties / project / title
      Removed value: -"Project"
    • removedInput schema / properties / task_code / title
      Removed value: -"Task Code"
    • removedInput schema / title
      Removed value: -"p6_get_relationshipsArguments"
  3. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already cover readOnly, idempotent, non-destructive, non-open-world, so the safety profile is settled. The description adds genuine behavioral context beyond that: the exact return envelope keys {total, offset, returned, next_offset, rows, lag_rule}, the fact that paging continues via next_offset, and that lag_rule identifies which calendar converts lag days. This is real value, though it could say more about row shape or what happens for activities with no relationships.

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 return envelope is front-loaded ahead of parameter notes, which is the right ordering for an agent scanning for output shape. The prose is dense and parenthetical, reading like compressed notes rather than sentences, but nearly every clause carries information. Minor waste exists in restating enum values that the schema already declares.

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 8 parameters and no output schema, the description must carry the return-shape burden, and it does via the envelope key list and next_offset paging hint. Lag handling — the least obvious part of P6 relationships — is explained with enough depth to call the tool correctly. It remains slightly incomplete on what individual row objects contain beyond IDs.

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 88%, so the schema already documents limit, offset, detail, fields, project and task_code, giving a baseline of 3. The description adds meaning for lag_d (days), explain=True (adds lag_h in hours), and lag_rule (project schedule option vs predecessor calendar default), plus the note that fields= always keeps task_pred_id — though that last point is largely repeated from the schema. The added value is real but concentrated in the lag semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names the resource precisely — predecessor/successor relationships of a single activity — which is distinct from siblings like p6_get_activity or p6_query_activities that return activity records. It also states the scope is 'one page', so the agent knows this is a paginated fetch. It stops short of a clean verb-led sentence, but the purpose is unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is implied through the direction parameter (pred, succ, both) and the pagination hints, so an agent can infer when this tool is the right call for dependency data. However, there is no explicit when-to-use or when-not-to-use statement, and no sibling is named as an alternative for related lookups. Guidance is adequate but inferred rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.