eyaltoledano/claude-task-master · error
MISSING_ARGUMENT
MISSING_ARGUMENT
Error message
tasksJsonPath is required
What it means
deleteTagDirect requires the filesystem path to the tasks JSON file (tasksJsonPath) to locate and modify tag data. When the argument is missing/empty it short-circuits with a structured MISSING_ARGUMENT error before doing any work. This is a guard against the MCP tool being invoked with an incomplete arguments object.
Source
Thrown at mcp-server/src/core/direct-functions/delete-tag.js:44
// Destructure expected args
const { tasksJsonPath, name, yes = false, 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('deleteTagDirect called without tasksJsonPath');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_ARGUMENT',
message: 'tasksJsonPath is required'
}
};
}
// Check required parameters
if (!name || typeof name !== 'string') {
log.error('Missing required parameter: name');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_PARAMETER',
message: 'Tag name is required and must be a string'
}
};
}
View on GitHub (pinned to c0c98d367c)
Solutions
- Pass tasksJsonPath explicitly, e.g. { tasksJsonPath: '/abs/path/.taskmaster/tasks.json' }.
- Ensure the MCP server is launched with the correct project root so path auto-resolution populates the argument.
- Confirm the .taskmaster/tasks.json file exists and pass its absolute path.
- If using a wrapper, log the arguments object reaching deleteTagDirect to see which field is dropped.
Example fix
// before
await deleteTagDirect({ name: 'old-tag' });
// after
await deleteTagDirect({ tasksJsonPath: '/repo/.taskmaster/tasks.json', name: 'old-tag' }); Defensive patterns
Strategy: validation
Validate before calling
function assertTasksJsonPath(args) {
if (typeof args.tasksJsonPath !== 'string' || !args.tasksJsonPath.trim()) {
throw new Error('tasksJsonPath is required');
}
return args.tasksJsonPath;
} Type guard
function hasTasksJsonPath(a) {
return typeof a === 'object' && a !== null &&
typeof a.tasksJsonPath === 'string' && a.tasksJsonPath.length > 0;
} Try / catch
if (!hasTasksJsonPath(args)) {
return { success: false, error: { code: 'MISSING_ARGUMENT', message: 'tasksJsonPath is required' } };
}
const res = await deleteTagDirect(args); Prevention
- Centralize tasksJsonPath construction (resolve(projectRoot, '.taskmaster/tasks.json')) in one helper.
- Validate the MCP server's project-root env at startup, not at first tool call.
- Assert required argument presence in wrappers around direct functions.
- Keep the default .taskmaster/tasks.json layout so path auto-resolution works.
When it happens
Trigger: Calling the delete_tag MCP tool with an arguments object lacking the tasksJsonPath field, or the tool registration/wiring failing to forward the resolved tasks path (e.g. custom server setup omitting PROJECT_PATH resolution).
Common situations: Hand-rolled MCP client requests omitting the parameter; a broken custom MCP server config where environment-based path resolution (TM_TASKS_FILE / project root detection) fails; copying example tool calls that predate the tasksJsonPath requirement.
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
- MISSING_ARGUMENT
- MISSING_ARGUMENT
- Test results required for GREEN phase transition
- Prompt cannot be empty unless metadata is provided. Please p
- MISSING_ARGUMENT
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/decf7eb9a9ee72e7.
Report an issue: GitHub.