eyaltoledano/claude-task-master · error
MISSING_PARAMETER
MISSING_PARAMETER
Error message
Source tag name is required and must be a string
What it means
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.
Source
Thrown at mcp-server/src/core/direct-functions/copy-tag.js:59
log.error('copyTagDirect called without tasksJsonPath');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_ARGUMENT',
message: 'tasksJsonPath is required'
}
};
}
// Check required parameters
if (!sourceName || typeof sourceName !== 'string') {
log.error('Missing required parameter: sourceName');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_PARAMETER',
message: 'Source tag name is required and must be a string'
}
};
}
if (!targetName || typeof targetName !== 'string') {
log.error('Missing required parameter: targetName');
disableSilentMode();
return {
success: false,
error: {
code: 'MISSING_PARAMETER',
message: 'Target tag name is required and must be a string'
}
};
}
log.info(`Copying tag from "${sourceName}" to "${targetName}"`);View on GitHub (pinned to c0c98d367c)
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
Example fix
// before
await copyTagDirect({ tasksJsonPath, sourceName: 1, targetName: 'sprint-1' });
// after
await copyTagDirect({ tasksJsonPath, sourceName: 'master', targetName: 'sprint-1' }); Defensive patterns
Strategy: validation
Validate before calling
if (typeof sourceName !== 'string' || sourceName.trim() === '') throw new Error('sourceName must be a non-empty string'); Type guard
function isValidTagName(v) { return typeof v === 'string' && v.trim().length > 0; } Try / catch
const res = await copyTagDirect(args); if (!res.success && res.error.code === 'MISSING_PARAMETER') { console.error(res.error.message); } Prevention
- 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
When it happens
Trigger: Calling copy-tag without sourceName, with sourceName: null/undefined, or with a non-string (number, object) value; template strings that resolved to undefined.
Common situations: 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.
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
- projectRoot is required for getCurrentTag
- projectRoot is required for resolveTag
- MISSING_ARGUMENT
- MISSING_ARGUMENT
- MISSING_SOURCE_TAG
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/77ac30c3797ec125.
Report an issue: GitHub.