Skip to main content
Glama

p6_lookahead

Read-onlyIdempotent

Generate a paginated project look-ahead for Primavera P6, listing activities in a chosen day or week window with critical, in-progress, and completed filters.

Instructions

Look-ahead of a project, one page; also window, weeks, data_date, counts (categories and critical, all pages), critical_definition. The window starts at the data date (or from_date; a date alone at 00:00) and lasts days= (default 14) or weeks=, half-open [from, to). Listed: not started activities starting in it or spanning it, open ones finishing in it, every in-progress one (include_in_progress=False keeps those finishing in it) and, with include_completed=True, completed ones whose actual dates overlap it. Open activities use remaining dates (early when empty); LOE and WBS summary left out. Row: window (categories met), critical (open and critical under the project definition), fcst_start / fcst_finish (actual, else remaining), start_week / finish_week (week of the window, 1 = first 7 days; None outside). critical_only=True keeps the critical ones. wbs_name_contains and code filters as in p6_query_activities. Order: start, finish, Activity ID.

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>"
    },
    "name": "p6_lookahead"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoWindow length in calendar days (max 366).
limitNoRows per page (max 200).
weeksNoWindow length in weeks (max 52).
detailNobrief (default): rows without null values; full: every key.brief
fieldsNoFields to return (task_code always first); default all.
offsetNoRows to skip (next_offset of the previous page).
projectYesProject ID (p6_list_projects).
code_typeNo
from_dateNoYYYY-MM-DD HH:MM
code_valueNo
critical_onlyNo
include_completedNo
wbs_name_containsNo
include_child_codesNo
include_in_progressNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed35 schema fields changedv4.2.0
    • removedInput schema / properties / code_type / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / code_type / default
      Removed value: -null
    • addedInput schema / properties / code_type / type
      Added value: +"string"
    • removedInput schema / properties / code_value / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / code_value / default
      Removed value: -null
    • addedInput schema / properties / code_value / type
      Added value: +"string"
    • removedInput schema / properties / days / anyOf
      Removed value: -[
      -  {
      -    "description": "Window length in calendar days (max 366).",
      -    "maximum": 366,
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / days / default
      Removed value: -null
    • addedInput schema / properties / days / description
      Added value: +"Window length in calendar days (max 366)."
    • addedInput schema / properties / days / maximum
      Added value: +366
    • addedInput schema / properties / days / minimum
      Added value: +1
    • addedInput schema / properties / days / type
      Added value: +"integer"
    • 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."
    • removedInput schema / properties / fields / anyOf
      Removed value: -[
      -  {
      -    "description": "Fields to return (task_code always first); default all.",
      -    "items": {
      -      "enum": [
      -        "task_code",
      -        "task_name",
      -        "status_code",
      -        "task_type",
      -        "wbs_name",
      -        "early_start_date",
      -        "early_end_date",
      -        "late_start_date",
      -        "late_end_date",
      -        "act_start_date",
      -        "act_end_date",
      -        "target_start_date",
      -        "target_end_date",
      -        "cstr_type",
      -        "cstr_label",
      -        "cstr_date",
      -        "phys_complete_pct",
      -        "driving_path_flag",
      -        "orig_dur_d",
      -        "rem_dur_d",
      -        "total_float_d",
      -        "free_float_d",
      -        "float_path",
      -        "float_path_order"
      -      ],
      -      "type": "string"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / fields / default
      Removed value: -null
    • addedInput schema / properties / fields / description
      Added value: +"Fields to return (task_code always first); default all."
    • addedInput schema / properties / fields / items
      Added value: +{
      +  "enum": [
      +    "task_code",
      +    "task_name",
      +    "status_code",
      +    "task_type",
      +    "wbs_name",
      +    "early_start_date",
      +    "early_end_date",
      +    "late_start_date",
      +    "late_end_date",
      +    "act_start_date",
      +    "act_end_date",
      +    "target_start_date",
      +    "target_end_date",
      +    "cstr_type",
      +    "cstr_label",
      +    "cstr_date",
      +    "phys_complete_pct",
      +    "driving_path_flag",
      +    "orig_dur_d",
      +    "rem_dur_d",
      +    "total_float_d",
      +    "free_float_d",
      +    "float_path",
      +    "float_path_order"
      +  ],
      +  "type": "string"
      +}
    • addedInput schema / properties / fields / type
      Added value: +"array"
    • removedInput schema / properties / from_date / anyOf
      Removed value: -[
      -  {
      -    "description": "YYYY-MM-DD HH:MM",
      -    "pattern": "^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$",
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / from_date / default
      Removed value: -null
    • addedInput schema / properties / from_date / description
      Added value: +"YYYY-MM-DD HH:MM"
    • addedInput schema / properties / from_date / pattern
      Added value: +"^\\d{4}-\\d{2}-\\d{2}([ T]\\d{2}:\\d{2}(:\\d{2})?)?$"
    • addedInput schema / properties / from_date / type
      Added value: +"string"
    • 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)."
    • removedInput schema / properties / wbs_name_contains / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / wbs_name_contains / default
      Removed value: -null
    • addedInput schema / properties / wbs_name_contains / type
      Added value: +"string"
    • removedInput schema / properties / weeks / anyOf
      Removed value: -[
      -  {
      -    "description": "Window length in weeks (max 52).",
      -    "maximum": 52,
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • removedInput schema / properties / weeks / default
      Removed value: -null
    • addedInput schema / properties / weeks / description
      Added value: +"Window length in weeks (max 52)."
    • addedInput schema / properties / weeks / maximum
      Added value: +52
    • addedInput schema / properties / weeks / minimum
      Added value: +1
    • addedInput schema / properties / weeks / type
      Added value: +"integer"
  2. Changed16 schema fields changedv3.5.0
    • removedInput schema / properties / code_type / title
      Removed value: -"Code Type"
    • removedInput schema / properties / code_value / title
      Removed value: -"Code Value"
    • removedInput schema / properties / critical_only / title
      Removed value: -"Critical Only"
    • removedInput schema / properties / days / title
      Removed value: -"Days"
    • 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 / fields / title
      Removed value: -"Fields"
    • removedInput schema / properties / from_date / title
      Removed value: -"From Date"
    • removedInput schema / properties / include_child_codes / title
      Removed value: -"Include Child Codes"
    • removedInput schema / properties / include_completed / title
      Removed value: -"Include Completed"
    • removedInput schema / properties / include_in_progress / title
      Removed value: -"Include In Progress"
    • 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 / wbs_name_contains / title
      Removed value: -"Wbs Name Contains"
    • removedInput schema / properties / weeks / title
      Removed value: -"Weeks"
    • removedInput schema / title
      Removed value: -"p6_lookaheadArguments"
  3. Changed1 schema field changedv2.0.0
    • addedInput schema / properties / critical_only
      Added value: +{
      +  "default": false,
      +  "title": "Critical Only",
      +  "type": "boolean"
      +}
  4. 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 declare a read-only, idempotent, non-destructive operation, and the description goes well beyond that by disclosing inclusion rules (not-started starting or spanning the window, open ones finishing in it, every in-progress one, completed only with include_completed), exclusions (LOE and WBS summary), date fallbacks (remaining dates, early when empty) and fixed ordering. It also notes that counts aggregate across all pages, which is genuinely useful behaviour an agent could not infer elsewhere. It stops short of describing error or pagination-advance behaviour, so not a 5.

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?

Every clause carries information, but the text is a dense semicolon-chained block of telegraphic fragments ('also window, weeks, data_date, counts...') that is not clearly front-loaded or organized into purpose, inclusion rules, row shape and ordering. It repays close reading rather than scanning, which is a structural weakness for a description this long.

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?

For a complex 15-parameter reporting tool with no output schema, the description covers the key gaps: how the window is built, what rows qualify and what is excluded, what each row field means, default ordering, and that it is one page of results. Remaining gaps (pagination mechanics, error cases) are minor and partly covered by the schema.

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?

With 15 parameters and only 53% schema description coverage, the description carries real load: it defines from_date plus days/weeks window construction, the half-open interval, defaults (14 days), and the semantics of critical_only, include_completed, include_in_progress and the wbs/code filters. It also interprets output keys (window, critical, fcst_start/fcst_finish, start_week/finish_week, None outside). Parameters like limit, offset, detail and fields are left to their schema descriptions, which is reasonable given they are documented there.

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 opens with a concrete resource: a one-page look-ahead report of a project's activities scoped to a time window, and it spells out the window semantics ([from, to), days/weeks default 14). It distinguishes itself from the general query sibling by noting the WBS/code filters behave 'as in p6_query_activities' and by excluding LOE/WBS summary rows, so an agent can tell it is a window-oriented report rather than a generic activity search.

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 rather than stated: the window definition and the include_completed/include_in_progress/critical_only switches tell the agent how to scope, and the reference to p6_query_activities hints at the division of labour. However, there is no explicit when-to-use-this-instead-of-a-sibling statement or precondition list, leaving selection between p6_lookahead, p6_query_activities and p6_critical_path to inference.

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