{"record":{"id":"1fb0303a85594649","repo":"eyaltoledano/claude-task-master","slug":"missing-argument-1fb030","errorCode":"MISSING_ARGUMENT","errorMessage":"tasksJsonPath is required","messagePattern":"tasksJsonPath is required","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"mcp-server/src/core/direct-functions/rename-tag.js","lineNumber":44,"sourceCode":"\t// Destructure expected args\n\tconst { tasksJsonPath, oldName, newName, projectRoot } = 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('renameTagDirect 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 required parameters\n\t\tif (!oldName || typeof oldName !== 'string') {\n\t\t\tlog.error('Missing required parameter: oldName');\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_PARAMETER',\n\t\t\t\t\tmessage: 'Old tag name is required and must be a string'\n\t\t\t\t}\n\t\t\t};\n\t\t}\n","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/mcp-server/src/core/direct-functions/rename-tag.js#L26-L62","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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)"],"exampleFix":"// before\nawait client.callTool('rename_tag', { oldName: 'old', newName: 'new' });\n\n// after\nawait client.callTool('rename_tag', { oldName: 'old', newName: 'new', tasksJsonPath: '/project/.taskmaster/tasks/tasks.json' });","handlingStrategy":"validation","validationCode":"const path = require('path');\nconst tasksJsonPath = args.tasksJsonPath ?? path.join(projectRoot, '.taskmaster', 'tasks', 'tasks.json');\nif (typeof tasksJsonPath !== 'string' || tasksJsonPath.trim() === '') {\n  throw new Error('rename_tag requires tasksJsonPath');\n}","typeGuard":"function hasTasksJsonPath(args) {\n  return typeof args === 'object' && args !== null &&\n    typeof args.tasksJsonPath === 'string' && args.tasksJsonPath.trim().length > 0;\n}","tryCatchPattern":"try {\n  const res = await client.callTool('rename_tag', { oldName, newName, tasksJsonPath });\n  if (res.error?.code === 'MISSING_ARGUMENT') {\n    console.error('Provide tasksJsonPath or projectRoot so the server can locate tasks.json');\n  }\n} catch (e) {\n  console.error('rename_tag failed:', e.message);\n}","preventionTips":["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"],"tags":["mcp","validation","missing-argument"],"backgroundTag":"missing-required-parameter","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}