Skip to main content
Glama

p6_get_activity

Read-onlyIdempotent

Retrieve full details for one Primavera P6 activity, including dates, constraints, WBS, relationships, assignments, codes, and UDFs, to inspect or troubleshoot a single task.

Instructions

Full detail of one activity: the list fields (see p6_query_activities), secondary constraint, remaining, expected, suspend and resume dates, calendar (hours_per_day converts hours to days), WBS (wbs_code as in p6_list_wbs, wbs_path names), predecessors and successors (first 50 of each, with predecessor_count / successor_count; page further with p6_get_relationships), assignments (resource and role, quantities and costs as stored), activity codes, UDFs and notebooks (first 50 of each), lag_rule and schedule_state. Brief (default): no null values in the activity and its list rows, and the links without direction (the list says it) and without other_project when it is this project. Link lags in days (lag_d); explain=True adds lag_h (hours).

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_activity"
  }
}

Input Schema

NameRequiredDescriptionDefault
detailNobrief (default): rows without null values; full: every key.brief
explainNoTrue: also return the fixed texts in words (see the description).
projectYesProject ID (p6_list_projects).
task_codeYesActivity ID (task_code).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv4.2.0
    • changedInput schema / properties / detail / default
      Previous value: -"full"New value: +"brief"
    • changedInput schema / properties / detail / description
      Previous value: -"brief: rows without their null values; full (default): every key."New value: +"brief (default): rows without null values; full: every key."
    • addedInput schema / properties / explain
      Added value: +{
      +  "default": false,
      +  "description": "True: also return the fixed texts in words (see the description).",
      +  "type": "boolean"
      +}
    • changedInput schema / properties / project / description
      Previous value: -"Project ID as shown in P6 (p6_list_projects)."New value: +"Project ID (p6_list_projects)."
  2. Changed4 schema fields changedv3.5.0
    • addedInput schema / properties / detail
      Added value: +{
      +  "default": "full",
      +  "description": "brief: rows without their null values; full (default): every key.",
      +  "enum": [
      +    "full",
      +    "brief"
      +  ],
      +  "type": "string"
      +}
    • 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_activityArguments"
  3. First observedv0.1.0

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world, so the safety profile is covered. The description does add genuinely useful behavior beyond that: default brief mode elides nulls, links omit direction and same-project other_project, timestamps/units are spelled out (hours_per_day, lag_d, lag_h under explain), and related collections are truncated at 50 items. It does not say what happens when project/task_code matches nothing, so it is solid but not exhaustive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The response shape is front-loaded ("Full detail of one activity") and every clause carries payload, but the second block is a run-on thicket of nested parentheses ("the links without direction (the list says it) and without other_project when it is this project") that forces re-reading. Dense is fine; ambiguous is not, and this drifts toward the latter.

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 no output schema, the description carries the return-value burden itself and does so at length, including per-item truncation limits and the units used for lags and calendar conversion. The gaps are error/null behavior for an unknown project or task_code and whether task_code is scoped to the project, which for a mutation-free lookup tool is a modest but real omission.

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 already 100%, yet the description still adds meaning the schema does not carry: brief mode removes null-valued keys from the activity and its list rows and drops redundant link fields, and explain=True maps lag_d into lag_h. That is real semantic value above baseline, though it restates the detail enum rather than going further on project scope or code uniqueness.

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+resource framing ("Full detail of one activity") and enumerates exactly what detail is returned (dates, calendar, WBS, predecessors/successors, assignments, codes, UDFs, notebooks). It distinguishes itself from the list-oriented siblings by referencing p6_query_activities for list fields, p6_list_wbs for wbs_code semantics, and p6_get_relationships for paging links.

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

Usage Guidelines4/5

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

It routes the agent to alternatives in specific cases: p6_query_activities for the list fields, p6_get_relationships to page beyond the first 50 predecessors/successors, and p6_list_wbs for WBS naming. It never states an explicit exclusion such as "do not use this to enumerate activities in a project," so it falls short of a full when/when-not treatment.

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