eyaltoledano/claude-task-master · error
MISSING_ARGUMENT
MISSING_ARGUMENT
Error message
tasksJsonPath is required
What it means
analyzeTaskComplexityDirect needs tasksJsonPath to know which task list to analyze; the guard at the top returns MISSING_ARGUMENT when it is absent. Without the path the complexity analysis has no input file.
Source
Thrown at mcp-server/src/core/direct-functions/analyze-task-complexity.js:56
projectRoot,
ids,
from,
to,
tag
} = args;
const logWrapper = createLogWrapper(log);
// --- Initial Checks (remain the same) ---
try {
log.info(`Analyzing task complexity with args: ${JSON.stringify(args)}`);
if (!tasksJsonPath) {
log.error('analyzeTaskComplexityDirect called without tasksJsonPath');
return {
success: false,
error: {
code: 'MISSING_ARGUMENT',
message: 'tasksJsonPath is required'
}
};
}
if (!outputPath) {
log.error('analyzeTaskComplexityDirect called without outputPath');
return {
success: false,
error: { code: 'MISSING_ARGUMENT', message: 'outputPath is required' }
};
}
const tasksPath = tasksJsonPath;
const resolvedOutputPath = outputPath;
log.info(`Analyzing task complexity from: ${tasksPath}`);
log.info(`Output report will be saved to: ${resolvedOutputPath}`);
View on GitHub (pinned to c0c98d367c)
Solutions
- Pass the absolute path to .taskmaster/tasks.json as tasksJsonPath
- Re-sync the MCP client tool schema after upgrading task-master
- Confirm the tasks file exists at the path you pass (path errors surface separately, but the argument must be present)
Example fix
// before
analyze_project_complexity({});
// after
analyze_project_complexity({ tasksJsonPath: '/project/.taskmaster/tasks.json' }); Defensive patterns
Strategy: validation
Validate before calling
if (!args?.tasksJsonPath || typeof args.tasksJsonPath !== 'string') {
throw new Error('analyze_project_complexity requires a non-empty tasksJsonPath');
} Type guard
function hasTasksJsonPath(a) {
return typeof a === 'object' && a !== null && typeof a.tasksJsonPath === 'string' && a.tasksJsonPath.length > 0;
} Try / catch
const res = await analyzeTaskComplexityDirect(args);
if (!res.success && res.error?.code === 'MISSING_ARGUMENT' && /tasksJsonPath/.test(res.error.message)) {
// supply path and retry
} Prevention
- Build tool args from a single validated config object
- Check required fields against the tool schema before each call
- Default tasksJsonPath to <root>/.taskmaster/tasks.json in wrappers
When it happens
Trigger: Calling the analyze_project_complexity MCP tool without tasksJsonPath or with an empty value.
Common situations: Tool schema drift between MCP client and server versions; scripts building tool arguments dynamically and omitting the path; wrong environment where the tasks file path was never configured.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/0f715c7ec07729b3.
Report an issue: GitHub.