eyaltoledano/claude-task-master · error
MISSING_PARAMETER
MISSING_PARAMETER
Error message
Tag name is required and must be a string
What it means
After checking tasksJsonPath, useTagDirect validates the required name parameter: it must be a non-empty string identifying the tag to switch to. Anything missing, null, or non-string is rejected with MISSING_PARAMETER.
Source
Thrown at mcp-server/src/core/direct-functions/use-tag.js:56
log.error('useTagDirect 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'
}
};
}
log.info(`Switching to tag: ${name}`);
// Call the useTag function
const result = await useTag(
tasksJsonPath,
name,
{}, // options (empty for now)
{
session,
mcpLog,
projectRoot
},
'json' // outputFormat - use 'json' to suppress CLI UIView on GitHub (pinned to c0c98d367c)
Solutions
- Provide name as a non-empty string in the tool arguments
- Quote string values in shell/JSON so they aren't parsed as numbers
- Add client-side schema validation (e.g. zod: z.string().min(1)) before the call
Example fix
// before
await useTagDirect({ tasksJsonPath, name: 42 });
// after
await useTagDirect({ tasksJsonPath, name: String(tagName) }); Defensive patterns
Strategy: validation
Validate before calling
function assertTagName(args) {
if (!args || typeof args.name !== 'string' || args.name.length === 0) {
throw new Error('name is required and must be a non-empty string');
}
} Type guard
function hasTagName(a): a is { name: string } & Record<string, unknown> {
return typeof a === 'object' && a !== null && typeof (a as any).name === 'string' && (a as any).name.length > 0;
} Try / catch
try {
const res = await useTagDirect({ tasksJsonPath, name });
if (!res.success && res.error?.code === 'MISSING_PARAMETER') {
throw new TypeError(`use-tag: ${res.error.message}`);
}
} catch (e) { /* handle */ } Prevention
- Validate name is a non-empty string before the call
- Quote shell/JSON values so tags aren't coerced to numbers
- Use zod/yup schemas at the CLI boundary: z.string().min(1)
When it happens
Trigger: Calling use-tag without name, with name: null/undefined, or with a non-string value (number, object) — e.g. args parsed from JSON where the tag was intended to be quoted.
Common situations: Client sends {"name": 123} or omits name; CLI flag like --tag passed with no value; template expansion leaving name empty.
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
AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29).
Data as JSON: /api/errors/394708356bf62088.
Report an issue: GitHub.