{"record":{"id":"77ac30c3797ec125","repo":"eyaltoledano/claude-task-master","slug":"missing-parameter-77ac30","errorCode":"MISSING_PARAMETER","errorMessage":"Source tag name is required and must be a string","messagePattern":"Source tag name is required and must be a string","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp-server/src/core/direct-functions/copy-tag.js","lineNumber":59,"sourceCode":"\t\t\tlog.error('copyTagDirect 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 (!sourceName || typeof sourceName !== 'string') {\n\t\t\tlog.error('Missing required parameter: sourceName');\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: 'Source tag name is required and must be a string'\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tif (!targetName || typeof targetName !== 'string') {\n\t\t\tlog.error('Missing required parameter: targetName');\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: 'Target tag name is required and must be a string'\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\tlog.info(`Copying tag from \"${sourceName}\" to \"${targetName}\"`);","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/mcp-server/src/core/direct-functions/copy-tag.js#L41-L77","documentation":"copyTagDirect validates that sourceName is a non-empty string before copying. The source tag is the tag whose tasks will be duplicated; if it is missing or not a string the function returns MISSING_PARAMETER rather than attempting a copy from an undefined tag.","triggerScenarios":"Calling copy-tag without sourceName, with sourceName: null/undefined, or with a non-string (number, object) value; template strings that resolved to undefined.","commonSituations":"LLM tool calls where the model omitted the source argument; dynamic UIs passing numeric tag IDs instead of names; renaming the parameter in a wrapper without updating the call.","solutions":["Pass a non-empty string sourceName matching an existing tag (e.g. 'master')","List current tags first (tag tools / 'task-master tags') to confirm the source exists","Coerce or validate the value: typeof sourceName === 'string' && sourceName.trim() !== ''","Check that your client's tool schema includes sourceName as a required string property"],"exampleFix":"// before\nawait copyTagDirect({ tasksJsonPath, sourceName: 1, targetName: 'sprint-1' });\n// after\nawait copyTagDirect({ tasksJsonPath, sourceName: 'master', targetName: 'sprint-1' });","handlingStrategy":"validation","validationCode":"if (typeof sourceName !== 'string' || sourceName.trim() === '') throw new Error('sourceName must be a non-empty string');","typeGuard":"function isValidTagName(v) { return typeof v === 'string' && v.trim().length > 0; }","tryCatchPattern":"const res = await copyTagDirect(args); if (!res.success && res.error.code === 'MISSING_PARAMETER') { console.error(res.error.message); }","preventionTips":["Verify the source tag exists via the tag listing tools before copying","Never pass numeric tag IDs; use the tag's string name","Mark sourceName as required string in your client-side tool schema"],"tags":["mcp","parameter-validation","tags"],"backgroundTag":"missing-required-parameter","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}