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

Closed
opened 2025-10-14 15:39:14 -06:00 by navan · 0 comments
Owner

Originally created by @dizhaky on 10/3/2025

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
*Originally created by @dizhaky on 10/3/2025* ### 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:** ```javascript { "projectRoot": "/Users/username/project", "withSubtasks": true } // Error: tasksJsonPath is required ``` **Workaround (works):** ```javascript { "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`
Sign in to join this conversation.
No labels
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:ai-models
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:cli
area:installation
area:installation
area:installation
area:installation
area:installation
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:mcp
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:task-management
area:vscode-extension
area:vscode-extension
area:vscode-extension
area:vscode-extension
area:vscode-extension
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
bug
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
documentation
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
duplicate
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
enhancement
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
feedback
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
good first issue
help wanted
help wanted
help wanted
help wanted
help wanted
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
high-priority
integration request
integration request
integration request
integration request
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
invalid
low-priority
low-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
medium-priority
provider:anthropic
provider:anthropic
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:claude-code
provider:gemini-cli
provider:openai
provider:perplexity
question
question
question
question
question
question
question
question
question
question
question
question
question
question
refactor
refactor
wontfix
wontfix
wontfix
wontfix
wontfix
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github/claude-task-master#41
No description provided.