{"record":{"id":"7c8e3bca746e4db2","repo":"eyaltoledano/claude-task-master","slug":"missing-parameter-7c8e3b","errorCode":"MISSING_PARAMETER","errorMessage":"The id parameter is required for scoping down tasks","messagePattern":"The id parameter is required for scoping down tasks","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp-server/src/core/direct-functions/scope-down.js","lineNumber":68,"sourceCode":"\t\t\tlog.error('scopeDownDirect called without tasksJsonPath');\n\t\t\tdisableSilentMode(); // Disable before returning\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: {\n\t\t\t\t\tcode: 'MISSING_ARGUMENT',\n\t\t\t\t\tmessage: 'tasksJsonPath is required'\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t// Check required parameters\n\t\tif (!id) {\n\t\t\tlog.error('Missing required parameter: id');\n\t\t\tdisableSilentMode();\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: {\n\t\t\t\t\tcode: 'MISSING_PARAMETER',\n\t\t\t\t\tmessage: 'The id parameter is required for scoping down tasks'\n\t\t\t\t}\n\t\t\t};\n\t\t}\n\n\t\t// Parse task IDs - convert to numbers as expected by scopeDownTask\n\t\tconst taskIds = id.split(',').map((taskId) => parseInt(taskId.trim(), 10));\n\n\t\tlog.info(\n\t\t\t`Scoping down tasks: ${taskIds.join(', ')}, strength: ${strength}, research: ${research}`\n\t\t);\n\n\t\t// Call the scopeDownTask function\n\t\tconst result = await scopeDownTask(\n\t\t\ttasksJsonPath,\n\t\t\ttaskIds,\n\t\t\tstrength,\n\t\t\tcustomPrompt,","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/mcp-server/src/core/direct-functions/scope-down.js#L50-L86","documentation":"This error is returned by the scopeDownDirect MCP tool handler when the 'id' parameter is missing. Scoping down a task requires knowing which task (or subtask) to narrow, so without an id the operation cannot proceed. The function returns a structured error object instead of throwing, so MCP clients see success:false with code MISSING_PARAMETER.","triggerScenarios":"Calling the scope-down MCP tool without passing the 'id' argument (e.g. only passing tasksJsonPath or scope details), or passing id as empty string/null because the client serialized an absent optional field.","commonSituations":"LLM agents invoking the tool with an incomplete argument set; hand-written MCP client scripts omitting id; copy-pasted invocations from examples that assumed a default task id.","solutions":["Pass the task id (e.g. '1' or '1.2') in the tool arguments when calling scope-down","Verify the argument object sent by the MCP client includes id and is not empty","If id comes from a variable, check it is populated before invoking the tool"],"exampleFix":"// before\nawait client.callTool('scope-down', { tasksJsonPath: './tasks.json' });\n// after\nawait client.callTool('scope-down', { tasksJsonPath: './tasks.json', id: '1.2' });","handlingStrategy":"validation","validationCode":"if (!args || args.id == null || args.id === '') throw new Error('scope-down requires a task id');","typeGuard":"function hasId(args) { return typeof args?.id === 'string' ? args.id.length > 0 : typeof args?.id === 'number'; }","tryCatchPattern":"try { const r = await callTool('scope-down', args); if (!r.success) throw new Error(`${r.error.code}: ${r.error.message}`); } catch (e) { if (e.message.includes('MISSING_PARAMETER')) { /* prompt for id */ } else throw e; }","preventionTips":["Always pass both id and tasksJsonPath to scope tools","Build a typed wrapper around MCP tool calls requiring id","Log full arguments before invoking tools during development"],"tags":["mcp","validation","missing-parameter"],"backgroundTag":"missing-required-parameter","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}