eyaltoledano/claude-task-master · error

MISSING_ARGUMENT

MISSING_ARGUMENT

Error message

tasksJsonPath is required

What it means

scopeUpDirect returns this error when the 'tasksJsonPath' argument is absent. The tool needs the filesystem path to the tasks.json file in order to locate and modify the task data. Without it, no file can be loaded and the call is rejected early with code MISSING_ARGUMENT.

Source

Thrown at mcp-server/src/core/direct-functions/scope-up.js:55

		tag
	} = args;
	const { session } = context; // Destructure session from context

	// Enable silent mode to prevent console logs from interfering with JSON response
	enableSilentMode();

	// Create logger wrapper using the utility
	const mcpLog = createLogWrapper(log);

	try {
		// Check if tasksJsonPath was provided
		if (!tasksJsonPath) {
			log.error('scopeUpDirect called without tasksJsonPath');
			disableSilentMode(); // Disable before returning
			return {
				success: false,
				error: {
					code: 'MISSING_ARGUMENT',
					message: 'tasksJsonPath is required'
				}
			};
		}

		// Check required parameters
		if (!id) {
			log.error('Missing required parameter: id');
			disableSilentMode();
			return {
				success: false,
				error: {
					code: 'MISSING_PARAMETER',
					message: 'The id parameter is required for scoping up tasks'
				}
			};
		}

View on GitHub (pinned to c0c98d367c)

Solutions

  1. Provide tasksJsonPath (absolute path to tasks.json) in the tool arguments
  2. Run from a taskmaster project so the correct tasks.json path is available
  3. Confirm the argument key is spelled 'tasksJsonPath', not 'tasksPath' or similar

Example fix

// before
await client.callTool('scope-up', { id: '3' });
// after
await client.callTool('scope-up', { tasksJsonPath: '/project/.taskmaster/tasks.json', id: '3' });
Defensive patterns

Strategy: validation

Validate before calling

if (!args?.tasksJsonPath) throw new Error('scope-up requires tasksJsonPath');

Type guard

function hasTasksPath(args) { return typeof args?.tasksJsonPath === 'string' && args.tasksJsonPath.trim().length > 0; }

Try / catch

try { const r = await callTool('scope-up', args); if (!r.success) throw new Error(`${r.error.code}: ${r.error.message}`); } catch (e) { if (e.message.includes('MISSING_ARGUMENT')) { /* resolve tasks.json path and retry */ } else throw e; }

Prevention

When it happens

Trigger: Invoking the scope-up MCP tool with an empty arguments object, or with tasksJsonPath undefined/null/empty-string because the caller did not resolve the project's tasks.json path.

Common situations: Running the MCP server outside a taskmaster-initialized project so the client has no tasksJsonPath to pass; agents that guessed arguments; refactors where the path field was renamed on the client side.

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/4eff7a434e3ca9f5. Report an issue: GitHub.