eyaltoledano/claude-task-master · error

MISSING_PARAMETER

MISSING_PARAMETER

Error message

Either the prompt parameter or both title and description parameters are required for adding a task

What it means

addTaskDirect can create a task either from a natural-language prompt (parsed by AI) or from explicit title and description. If neither a prompt nor both title and description are supplied, it returns MISSING_PARAMETER since there is no content for the new task.

Source

Thrown at mcp-server/src/core/direct-functions/add-task.js:80

			};
		}

		// Use provided path
		const tasksPath = tasksJsonPath;

		// Check if this is manual task creation or AI-driven task creation
		const isManualCreation = args.title && args.description;

		// Check required parameters
		if (!args.prompt && !isManualCreation) {
			log.error(
				'Missing required parameters: either prompt or title+description must be provided'
			);
			disableSilentMode();
			return {
				success: false,
				error: {
					code: 'MISSING_PARAMETER',
					message:
						'Either the prompt parameter or both title and description parameters are required for adding a task'
				}
			};
		}

		// Extract and prepare parameters
		const taskDependencies = Array.isArray(dependencies)
			? dependencies // Already an array if passed directly
			: dependencies // Check if dependencies exist and are a string
				? String(dependencies)
						.split(',')
						.map((id) => parseInt(id.trim(), 10)) // Split, trim, and parse
				: []; // Default to empty array if null/undefined
		const taskPriority = priority || 'medium'; // Default priority

		let manualTaskData = null;
		let newTaskId;

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Provide a prompt parameter describing the task, OR provide both title and description
  2. If using title/description, ensure both are non-empty strings
  3. Check the calling template/workflow for empty interpolated values

Example fix

// before
add_task({ tasksJsonPath: path, title: 'Fix bug' });
// after
add_task({ tasksJsonPath: path, title: 'Fix bug', description: 'Null check in parser causes crash on empty input' });
Defensive patterns

Strategy: validation

Validate before calling

const { prompt, title, description } = args ?? {};
const hasPrompt = typeof prompt === 'string' && prompt.trim().length > 0;
const hasTitleDesc = typeof title === 'string' && title.trim().length > 0 &&
                     typeof description === 'string' && description.trim().length > 0;
if (!hasPrompt && !hasTitleDesc) {
  throw new Error('Provide either a prompt or both title and description');
}

Type guard

function canAddTask(a) {
  const p = typeof a?.prompt === 'string' && a.prompt.trim() !== '';
  const t = typeof a?.title === 'string' && a.title.trim() !== '';
  const d = typeof a?.description === 'string' && a.description.trim() !== '';
  return p || (t && d);
}

Try / catch

const res = await addTaskDirect(args);
if (!res.success && res.error?.code === 'MISSING_PARAMETER') {
  // ask user for prompt or title+description, then retry
}

Prevention

When it happens

Trigger: add_task called with only tasksJsonPath; or with title but no description (or vice versa); or with empty-string values for all three.

Common situations: Prompt templating that drops the prompt field; UI forms submitting incomplete title/description pairs; misunderstanding that title alone is insufficient.

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/0906a8c89b98ef3a. Report an issue: GitHub.