Skip to main content
Glama

critical_path

Read-onlyIdempotent

Compute the longest path through dependent project tasks, identify slack, and apply merge-bias duration adjustments to expose schedule risk.

Instructions

Compute critical path with merge-bias adjustment for project schedules.

Performs forward/backward pass to identify critical tasks and slack. Applies merge bias: tasks with >2 predecessors get 5% duration increase per extra predecessor. Returns the critical path, task slack, and project duration. Use when sequencing dependent tasks to find the longest path and available slack.

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": {
      "tasks": "<tasks>"
    },
    "name": "critical_path"
  }
}

Input Schema

NameRequiredDescriptionDefault
tasksYesAll tasks in the project graph. Each task must have a unique name.
projectNoOptional project/repo identifier this estimate belongs to, for cross-project analytics.
task_typeNoOptional task type for feedback matching.
session_idNoOptional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.
task_labelNoOptional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changedv0.8.0
    • removedInput schema / additionalProperties
      Removed value: -false
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Optional project/repo identifier this estimate belongs to, for cross-project analytics.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / session_id
      Added value: +{
      +  "description": "Optional session identifier (minted by a calling agent/hook) used to deduplicate repeated estimate calls for the same task within a session.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • addedInput schema / properties / task_label
      Added value: +{
      +  "description": "Optional free-text label identifying the task this estimate is for (e.g. an issue key or short title). Surfaced on get_pending_estimates output for triage.",
      +  "minLength": 1,
      +  "type": "string"
      +}
    • removedInput schema / properties / tasks / items / additionalProperties
      Removed value: -false
    • addedInput schema / properties / tasks / maxItems
      Added value: +500
  2. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover safety (readOnly, idempotent, non-destructive), and the description goes further by disclosing the actual computation: forward/backward pass plus a concrete merge-bias rule (>2 predecessors adds 5% duration per extra predecessor). It also lists what is returned. It does not mention the 500-task cap or how cycles/unknown predecessor names are handled, which is the main remaining behavioral gap.

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?

Four sentences, front-loaded with the core action, then mechanics, then when-to-use. No filler, though the merge-bias rule sentence is dense with numeric detail that could have been placed after the usage sentence for better flow.

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 5-parameter deterministic computation with fully documented schema and no output schema, the description covers purpose, algorithm, and the three return values (critical path, slack, duration). Only edge-case behavior and input limits (maxItems 500, cycle handling) are unaddressed.

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 description coverage is 100%, so every parameter including the nested task fields is already documented, establishing a baseline of 3. The description adds conceptual framing (tasks as a dependency graph, predecessors driving merge bias) but no syntax, format, or constraint detail beyond the schema.

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?

Names a specific verb+resource ("Compute critical path") and a distinguishing modifier ("merge-bias adjustment") that separates it from schedule_risk and monte_carlo_schedule. The second sentence enumerates the algorithm and outputs, so an agent knows exactly what class of computation this is.

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?

Gives a clear trigger: "Use when sequencing dependent tasks to find the longest path and available slack." That is sufficient context to select it over forecasting siblings, but no explicit exclusion or named alternative (e.g. when to prefer monte_carlo_schedule or schedule_risk instead) is offered.

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