{"record":{"id":"23d64d773c3c0cd0","repo":"eyaltoledano/claude-task-master","slug":"missing-argument-23d64d","errorCode":"MISSING_ARGUMENT","errorMessage":"tasksJsonPath is required","messagePattern":"tasksJsonPath is required","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp-server/src/core/direct-functions/fix-dependencies.js","lineNumber":33,"sourceCode":" * @param {string} args.tasksJsonPath - Explicit path to the tasks.json file.\n * @param {string} args.projectRoot - Project root directory\n * @param {string} args.tag - Tag for the project\n * @param {Object} log - Logger object\n * @returns {Promise<{success: boolean, data?: Object, error?: {code: string, message: string}}>}\n */\nexport async function fixDependenciesDirect(args, log) {\n\t// Destructure expected args\n\tconst { tasksJsonPath, projectRoot, tag } = args;\n\ttry {\n\t\tlog.info(`Fixing invalid dependencies in tasks: ${tasksJsonPath}`);\n\n\t\t// Check if tasksJsonPath was provided\n\t\tif (!tasksJsonPath) {\n\t\t\tlog.error('fixDependenciesDirect called without tasksJsonPath');\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: {\n\t\t\t\t\tcode: 'MISSING_ARGUMENT',\n\t\t\t\t\tmessage: 'tasksJsonPath is required'\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t// Use provided path\n\t\tconst tasksPath = tasksJsonPath;\n\n\t\t// Verify the file exists\n\t\tif (!fs.existsSync(tasksPath)) {\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: {\n\t\t\t\t\tcode: 'FILE_NOT_FOUND',\n\t\t\t\t\tmessage: `Tasks file not found at ${tasksPath}`\n\t\t\t\t}\n\t\t\t};\n\t\t}","sourceCodeStart":15,"sourceCodeEnd":51,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/mcp-server/src/core/direct-functions/fix-dependencies.js#L15-L51","documentation":"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.","triggerScenarios":"Calling the fix_dependencies MCP tool without tasksJsonPath (or with an empty string / null).","commonSituations":"MCP client omitting the optional-looking parameter; tool wrappers forwarding only projectRoot; older client versions built before tasksJsonPath became a required argument.","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"],"exampleFix":"// before\nawait mcp.call('fix_dependencies', { projectRoot: '/repo' });\n// after\nawait mcp.call('fix_dependencies', { projectRoot: '/repo', tasksJsonPath: '/repo/.taskmaster/tasks/tasks.json' });","handlingStrategy":"validation","validationCode":"function resolveTasksJsonPath(projectRoot) {\n  const p = path.join(projectRoot, '.taskmaster', 'tasks', 'tasks.json');\n  if (!projectRoot) throw new Error('projectRoot is required to derive tasksJsonPath');\n  return p;\n}\nconst tasksJsonPath = resolveTasksJsonPath('/repo');\nawait callTool('fix_dependencies', { tasksJsonPath });","typeGuard":"function hasTasksJsonPath(args) {\n  return typeof args?.tasksJsonPath === 'string' && args.tasksJsonPath.length > 0;\n}","tryCatchPattern":"const res = await callTool('fix_dependencies', args);\nif (!res.success && res.error?.code === 'MISSING_ARGUMENT') {\n  console.error('fix_dependencies needs tasksJsonPath; pass <root>/.taskmaster/tasks/tasks.json');\n}","preventionTips":["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"],"tags":["mcp","missing-argument","validation"],"backgroundTag":"missing-required-argument","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}