eyaltoledano/claude-task-master · error
MISSING_ARGUMENT
MISSING_ARGUMENT
Error message
tasksJsonPath is required
What it means
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.
Source
Thrown at mcp-server/src/core/direct-functions/create-tag-from-branch.js:59
projectRoot
} = args;
const { session } = context;
// Enable silent mode to prevent console logs from interfering with JSON response
enableSilentMode();
// Create logger wrapper using the utility
const mcpLog = createLogWrapper(log);
try {
// Check if tasksJsonPath was provided
if (!tasksJsonPath) {
log.error('createTagFromBranchDirect called without tasksJsonPath');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_ARGUMENT',
message: 'tasksJsonPath is required'
}
};
}
// Check if projectRoot was provided
if (!projectRoot) {
log.error('createTagFromBranchDirect called without projectRoot');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_ARGUMENT',
message: 'projectRoot is required'
}
};
}
View on GitHub (pinned to c0c98d367c)
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
Example fix
// before
await createTagFromBranchDirect({ projectRoot });
// after
await createTagFromBranchDirect({ tasksJsonPath: path.join(projectRoot, '.taskmaster/tasks.json'), projectRoot }); Defensive patterns
Strategy: validation
Validate before calling
if (typeof tasksJsonPath !== 'string' || tasksJsonPath.trim() === '') throw new Error('tasksJsonPath is required'); Type guard
function hasTasksPath(a) { return typeof a === 'object' && a !== null && typeof a.tasksJsonPath === 'string' && a.tasksJsonPath.length > 0; } Try / catch
const res = await createTagFromBranchDirect(args); if (!res.success && res.error.code === 'MISSING_ARGUMENT') { console.error(res.error.message); } Prevention
- 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
When it happens
Trigger: 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.
Common situations: 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.
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
- projectRoot is required for isGitRepository
- projectRoot is required for getCurrentBranch
- projectRoot is required for getLocalBranches
- projectRoot is required for getRemoteBranches
- projectRoot is required for getGitHubRepoInfo
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/0608cbd9349e63b4.
Report an issue: GitHub.