eyaltoledano/claude-task-master · error

MISSING_PARAMETER

MISSING_PARAMETER

Error message

Tag name is required and must be a string

What it means

deleteTagDirect validates that the tag 'name' parameter is present and is a non-empty string before attempting deletion. Anything falsy (undefined, null, empty string) or of the wrong type produces this MISSING_PARAMETER structured error.

Source

Thrown at mcp-server/src/core/direct-functions/delete-tag.js:57

			log.error('deleteTagDirect 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(`Deleting tag: ${name}`);

		// Prepare options
		const options = {
			yes // For MCP, we always skip confirmation prompts
		};

		// Call the deleteTag function
		const result = await deleteTag(
			tasksJsonPath,
			name,
			options,
			{

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Pass a non-empty string tag name: { name: 'my-tag' }.
  2. List existing tags first (list_tags tool or read tasks.json tags) to confirm the exact name.
  3. Trim and type-check the value client-side before sending.
  4. If a numeric-looking name is involved, stringify it before calling.

Example fix

// before
await deleteTagDirect({ tasksJsonPath, name: tagNameId }); // undefined
// after
if (typeof tagName !== 'string' || !tagName.trim()) throw new Error('tag name required');
await deleteTagDirect({ tasksJsonPath, name: tagName.trim() });
Defensive patterns

Strategy: type-guard

Validate before calling

function assertTagName(name) {
  if (typeof name !== 'string' || name.trim() === '') {
    throw new TypeError('name must be a non-empty string');
  }
  return name.trim();
}

Type guard

function isNonEmptyString(v) {
  return typeof v === 'string' && v.trim().length > 0;
}

Try / catch

const res = await deleteTagDirect({ tasksJsonPath, name });
if (!res.success && res.error?.code === 'MISSING_PARAMETER') {
  // prompt user to pick a tag; list tags via list_tags before deleting
}

Prevention

When it happens

Trigger: Calling delete_tag with name omitted, name: null, name: '' or a non-string (number, object) value; MCP schema validation bypassed by direct invocation of the direct function in tests or scripts.

Common situations: Tool calls built dynamically where the tag name variable is undefined; users typing a tag name with only whitespace trimming to empty; clients sending numeric IDs instead of tag name strings.

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


AI-assisted analysis of eyaltoledano/claude-task-master@c0c98d367c (2026-08-29). Data as JSON: /api/errors/ecb3df2eba34d6e4. Report an issue: GitHub.