eyaltoledano/claude-task-master · error
MISSING_ARGUMENT
MISSING_ARGUMENT
Error message
tasksJsonPath is required
What it means
fixDependenciesDirect requires an explicit path to the tasks.json file. If the tasksJsonPath argument is falsy the tool short-circuits with a MISSING_ARGUMENT error result before doing any work, because dependency repair mutates the task file and cannot guess its location.
Source
Thrown at mcp-server/src/core/direct-functions/fix-dependencies.js:33
* @param {string} args.tasksJsonPath - Explicit path to the tasks.json file.
* @param {string} args.projectRoot - Project root directory
* @param {string} args.tag - Tag for the project
* @param {Object} log - Logger object
* @returns {Promise<{success: boolean, data?: Object, error?: {code: string, message: string}}>}
*/
export async function fixDependenciesDirect(args, log) {
// Destructure expected args
const { tasksJsonPath, projectRoot, tag } = args;
try {
log.info(`Fixing invalid dependencies in tasks: ${tasksJsonPath}`);
// Check if tasksJsonPath was provided
if (!tasksJsonPath) {
log.error('fixDependenciesDirect called without tasksJsonPath');
return {
success: false,
error: {
code: 'MISSING_ARGUMENT',
message: 'tasksJsonPath is required'
}
};
}
// Use provided path
const tasksPath = tasksJsonPath;
// Verify the file exists
if (!fs.existsSync(tasksPath)) {
return {
success: false,
error: {
code: 'FILE_NOT_FOUND',
message: `Tasks file not found at ${tasksPath}`
}
};
}View on GitHub (pinned to c0c98d367c)
Solutions
- Pass tasksJsonPath explicitly, e.g. <projectRoot>/.taskmaster/tasks/tasks.json
- If only projectRoot is known, resolve the default file location and pass it
- Regenerate or upgrade the MCP client config so the argument is forwarded
Example fix
// before
await mcp.call('fix_dependencies', { projectRoot: '/repo' });
// after
await mcp.call('fix_dependencies', { projectRoot: '/repo', tasksJsonPath: '/repo/.taskmaster/tasks/tasks.json' }); Defensive patterns
Strategy: validation
Validate before calling
function resolveTasksJsonPath(projectRoot) {
const p = path.join(projectRoot, '.taskmaster', 'tasks', 'tasks.json');
if (!projectRoot) throw new Error('projectRoot is required to derive tasksJsonPath');
return p;
}
const tasksJsonPath = resolveTasksJsonPath('/repo');
await callTool('fix_dependencies', { tasksJsonPath }); Type guard
function hasTasksJsonPath(args) {
return typeof args?.tasksJsonPath === 'string' && args.tasksJsonPath.length > 0;
} Try / catch
const res = await callTool('fix_dependencies', args);
if (!res.success && res.error?.code === 'MISSING_ARGUMENT') {
console.error('fix_dependencies needs tasksJsonPath; pass <root>/.taskmaster/tasks/tasks.json');
} Prevention
- Wrap MCP calls in helpers that always inject tasksJsonPath
- Never treat tasksJsonPath as optional for file-mutating tools
- Store the resolved path once in your integration config
- Add a client-side schema check that required args are non-empty strings
When it happens
Trigger: Calling the fix_dependencies MCP tool without tasksJsonPath (or with an empty string / null).
Common situations: MCP client omitting the optional-looking parameter; tool wrappers forwarding only projectRoot; older client versions built before tasksJsonPath became a required argument.
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/23d64d773c3c0cd0.
Report an issue: GitHub.