{"record":{"id":"0608cbd9349e63b4","repo":"eyaltoledano/claude-task-master","slug":"missing-argument-0608cb","errorCode":"MISSING_ARGUMENT","errorMessage":"tasksJsonPath is required","messagePattern":"tasksJsonPath is required","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp-server/src/core/direct-functions/create-tag-from-branch.js","lineNumber":59,"sourceCode":"\t\tprojectRoot\n\t} = args;\n\tconst { session } = context;\n\n\t// Enable silent mode to prevent console logs from interfering with JSON response\n\tenableSilentMode();\n\n\t// Create logger wrapper using the utility\n\tconst mcpLog = createLogWrapper(log);\n\n\ttry {\n\t\t// Check if tasksJsonPath was provided\n\t\tif (!tasksJsonPath) {\n\t\t\tlog.error('createTagFromBranchDirect called without tasksJsonPath');\n\t\t\tdisableSilentMode();\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// Check if projectRoot was provided\n\t\tif (!projectRoot) {\n\t\t\tlog.error('createTagFromBranchDirect called without projectRoot');\n\t\t\tdisableSilentMode();\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: 'projectRoot is required'\n\t\t\t\t}\n\t\t\t};\n\t\t}\n","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/mcp-server/src/core/direct-functions/create-tag-from-branch.js#L41-L77","documentation":"createTagFromBranchDirect creates a new task-master tag derived from the current git branch, and it needs tasksJsonPath to know where tasks live. If tasksJsonPath is falsy it returns MISSING_ARGUMENT before any git or file operations.","triggerScenarios":"Calling the create-tag-from-branch MCP tool without tasksJsonPath; a custom harness that forwards only branchName/projectRoot; destructuring args where the path key is absent.","commonSituations":"Fresh MCP setups where default paths are assumed; clients with incomplete tool schemas; CI jobs invoking the direct function directly without wiring up the tasks path.","solutions":["Pass tasksJsonPath explicitly (e.g. path.join(projectRoot, '.taskmaster/tasks.json'))","Ensure the caller resolves the path against projectRoot before invoking","Verify the tool argument mapping in your MCP client includes tasksJsonPath"],"exampleFix":"// before\nawait createTagFromBranchDirect({ projectRoot });\n// after\nawait createTagFromBranchDirect({ tasksJsonPath: path.join(projectRoot, '.taskmaster/tasks.json'), projectRoot });","handlingStrategy":"validation","validationCode":"if (typeof tasksJsonPath !== 'string' || tasksJsonPath.trim() === '') throw new Error('tasksJsonPath is required');","typeGuard":"function hasTasksPath(a) { return typeof a === 'object' && a !== null && typeof a.tasksJsonPath === 'string' && a.tasksJsonPath.length > 0; }","tryCatchPattern":"const res = await createTagFromBranchDirect(args); if (!res.success && res.error.code === 'MISSING_ARGUMENT') { console.error(res.error.message); }","preventionTips":["Resolve tasksJsonPath from projectRoot in one shared helper","Keep the client tool schema in sync with required parameters","Test tool calls with a minimal args object to catch dropped params"],"tags":["mcp","argument-validation","git"],"backgroundTag":"missing-required-argument","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}