eyaltoledano/claude-task-master · warning
MISSING_ARGUMENT
MISSING_ARGUMENT
Error message
tasksJsonPath is required
What it means
renameTagDirect needs the path to the tasks.json file it operates on. When `tasksJsonPath` is falsy the function immediately disables silent mode and returns MISSING_ARGUMENT, since it cannot locate or mutate any tag data without it.
Source
Thrown at mcp-server/src/core/direct-functions/rename-tag.js:44
// Destructure expected args
const { tasksJsonPath, oldName, newName, 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('renameTagDirect called without tasksJsonPath');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_ARGUMENT',
message: 'tasksJsonPath is required'
}
};
}
// Check required parameters
if (!oldName || typeof oldName !== 'string') {
log.error('Missing required parameter: oldName');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_PARAMETER',
message: 'Old tag name is required and must be a string'
}
};
}
View on GitHub (pinned to c0c98d367c)
Solutions
- Pass tasksJsonPath explicitly, e.g. <projectRoot>/.taskmaster/tasks/tasks.json
- Pass projectRoot so the server can resolve the default tasks file location
- Update the MCP client schema binding so tasksJsonPath is included in rename_tag calls
- Verify the argument name casing (tasksJsonPath, not tasks_path or path)
Example fix
// before
await client.callTool('rename_tag', { oldName: 'old', newName: 'new' });
// after
await client.callTool('rename_tag', { oldName: 'old', newName: 'new', tasksJsonPath: '/project/.taskmaster/tasks/tasks.json' }); Defensive patterns
Strategy: validation
Validate before calling
const path = require('path');
const tasksJsonPath = args.tasksJsonPath ?? path.join(projectRoot, '.taskmaster', 'tasks', 'tasks.json');
if (typeof tasksJsonPath !== 'string' || tasksJsonPath.trim() === '') {
throw new Error('rename_tag requires tasksJsonPath');
} Type guard
function hasTasksJsonPath(args) {
return typeof args === 'object' && args !== null &&
typeof args.tasksJsonPath === 'string' && args.tasksJsonPath.trim().length > 0;
} Try / catch
try {
const res = await client.callTool('rename_tag', { oldName, newName, tasksJsonPath });
if (res.error?.code === 'MISSING_ARGUMENT') {
console.error('Provide tasksJsonPath or projectRoot so the server can locate tasks.json');
}
} catch (e) {
console.error('rename_tag failed:', e.message);
} Prevention
- Default tasksJsonPath to <projectRoot>/.taskmaster/tasks/tasks.json in your wrapper
- Pass projectRoot as the portable alternative and let the server resolve the path
- Use exact argument casing (tasksJsonPath) as declared in the tool schema
When it happens
Trigger: Calling the rename_tag MCP tool without tasksJsonPath; a client that relies on the server to derive the path but passes nothing; null/empty string arguments from a misconfigured wrapper or agent.
Common situations: Hand-written MCP requests omitting the path field; older clients predating the path requirement; agent tool calls where the path argument got dropped during JSON serialization; custom integrations that assume a default path is injected.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/1fb0303a85594649.
Report an issue: GitHub.