eyaltoledano/claude-task-master · error
INPUT_VALIDATION_ERROR
INPUT_VALIDATION_ERROR
Error message
Task ID (id) is required
What it means
INPUT_VALIDATION_ERROR with 'Task ID (id) is required' is returned when removeDependencyDirect is called without the id parameter identifying the task whose dependency should be removed. Like the other guards in this wrapper, it returns a structured error object rather than throwing. It fires before any file access or core call.
Source
Thrown at mcp-server/src/core/direct-functions/remove-dependency.js:45
// Check if tasksJsonPath was provided
if (!tasksJsonPath) {
log.error('removeDependencyDirect called without tasksJsonPath');
return {
success: false,
error: {
code: 'MISSING_ARGUMENT',
message: 'tasksJsonPath is required'
}
};
}
// Validate required parameters
if (!id) {
return {
success: false,
error: {
code: 'INPUT_VALIDATION_ERROR',
message: 'Task ID (id) is required'
}
};
}
if (!dependsOn) {
return {
success: false,
error: {
code: 'INPUT_VALIDATION_ERROR',
message: 'Dependency ID (dependsOn) is required'
}
};
}
// Use provided path
const tasksPath = tasksJsonPath;
View on GitHub (pinned to c0c98d367c)
Solutions
- Include the numeric or dotted task id (e.g. 5 or '5.2') in args.id
- Check the MCP tool invocation arguments include id
- Avoid id values that coerce to falsy (0, '', null); use a valid positive task ID
- Confirm the task exists in tasks.json and use its actual ID
Example fix
// before
await removeDependencyDirect({ tasksJsonPath, dependsOn: 3 }, log);
// after
await removeDependencyDirect({ tasksJsonPath, id: 5, dependsOn: 3 }, log); Defensive patterns
Strategy: validation
Validate before calling
if (args?.id === undefined || args?.id === null || args?.id === '') {
throw new Error('id (task ID) is required before calling removeDependencyDirect');
} Type guard
function hasTaskId(args) {
return typeof args?.id === 'string' ? args.id.length > 0 : typeof args?.id === 'number' && args.id > 0;
} Try / catch
const result = await removeDependencyDirect(args, log);
if (!result.success && result.error.message === 'Task ID (id) is required') {
console.error('Provide args.id, e.g. 5 or "5.2"');
} Prevention
- Always include both id and dependsOn in remove_dependency tool calls
- Validate tool arguments against the schema before invoking the direct function
- Use positive, existing task IDs (id=0 is falsy and would trigger this guard)
- Fetch the task first to confirm its ID before removing dependencies
When it happens
Trigger: Calling removeDependencyDirect(args, log) where args.id is undefined, null, or empty — tasksJsonPath and dependsOn may be present but id is missing (note: id=0 is also falsy and triggers this).
Common situations: MCP client omits the id parameter in the remove_dependency tool call; LLM tool-call arguments drop the field; a caller passes only dependsOn assuming the dependency owner is inferred.
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
- INVALID_TASK_ID
- Generated object does not match schema: ${validationError.me
- Invalid subtask ID format: ${subtaskId}. Expected format: "p
- Parent task with ID ${parentId} not found
- Parent task ${parentId} has no subtasks
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/6bcba1baacf7196e.
Report an issue: GitHub.