Skip to content

MCP Server: tasksJsonPath required error when file parameter not provided #1272

@dizhaky

Description

@dizhaky

Summary

The MCP server fails with "tasksJsonPath is required" error when only projectRoot is provided, even though the file parameter is documented as optional and should be automatically derived.

Version

  • task-master-ai: 0.27.3
  • Installation: Global via npm

Expected Behavior

When calling MCP tools without the file parameter, the server should automatically construct the path as ${projectRoot}/.taskmaster/tasks/tasks.json.

Actual Behavior

The server immediately returns an error before attempting to derive the path:

Error: tasksJsonPath is required
Version: 0.27.3
Name: task-master-ai
Current Tag: master

Reproduction

Failing call:

{
  "projectRoot": "/Users/username/project",
  "withSubtasks": true
}
// Error: tasksJsonPath is required

Workaround (works):

{
  "projectRoot": "/Users/username/project",
  "file": ".taskmaster/tasks/tasks.json",
  "withSubtasks": true
}
// Success

Root Cause

In the compiled mcp-server.js, the direct functions validate tasksJsonPath before the tool layer calls the path resolution function.

Affected Tools

All MCP tools: get_tasks, get_task, next_task, set_task_status, expand_task, add_task, update_task, update_subtask, remove_task, and many more.

Suggested Fix

The tool execute functions should call the path resolution function BEFORE calling the direct functions.

Impact

  • Severity: High - Breaks all MCP tool calls without explicit file parameter
  • Workaround: Always provide the file parameter explicitly

Environment

  • OS: macOS (darwin)
  • Installation: npm install -g task-master-ai

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:mcpMCP server and integrationbugSomething isn't workinghigh-priorityUrgent issue requiring immediate attention

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions