eyaltoledano/claude-task-master · error
MISSING_PARAMETER
MISSING_PARAMETER
Error message
Tag name is required and must be a string
What it means
addTagDirect validates that the tag name argument exists and is a string before creating the tag. Non-string values (numbers, null, undefined) or an absent name return this MISSING_PARAMETER error; the tag name is the primary key for tags so it must be well-formed.
Source
Thrown at mcp-server/src/core/direct-functions/add-tag.js:142
return {
success: true,
data: {
branchName: result.branchName,
tagName: result.tagName,
created: result.created,
mappingUpdated: result.mappingUpdated,
message: `Successfully created tag "${result.tagName}" from git branch "${result.branchName}"`
}
};
} else {
// Check required parameters for regular tag creation
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(`Creating new tag: ${name}`);
// Prepare options
const options = {
copyFromCurrent,
copyFromTag,
description
};
// Call the createTag function
const result = await createTag(
tasksJsonPath,
name,View on GitHub (pinned to c0c98d367c)
Solutions
- Provide name as a non-empty string in the add_tag call
- Coerce/validate the tag name to a string before invoking the tool
- Ensure the MCP client enforces the tool's input schema (name: string, required)
Example fix
// before
add_tag({ tasksJsonPath: path, name: 123 });
// after
add_tag({ tasksJsonPath: path, name: String(tagName).trim() }); Defensive patterns
Strategy: validation
Validate before calling
if (typeof args?.name !== 'string' || args.name.trim() === '') {
throw new TypeError('add_tag requires a non-empty string "name"');
} Type guard
function hasValidTagName(a) {
return typeof a?.name === 'string' && a.name.trim().length > 0;
} Try / catch
const res = await addTagDirect(args);
if (!res.success && res.error?.code === 'MISSING_PARAMETER') {
// surface schema error to caller / fix the name argument
} Prevention
- Coerce tag names to trimmed strings before calling
- Enable strict input-schema validation in the MCP client
- Ban numeric/undefined tag names in wrapper code
When it happens
Trigger: Calling add_tag without name, or with name as a non-string (e.g. 123, null, an object) — typically from MCP clients that don't enforce the schema.
Common situations: Older MCP client sending numeric tag names; prompt templating that leaves the name placeholder empty; programmatic tool calls bypassing schema validation.
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/ed90af8246be7203.
Report an issue: GitHub.