{"record":{"id":"e75c62cb73959780","repo":"eyaltoledano/claude-task-master","slug":"missing-prompt","errorCode":"MISSING_PROMPT","errorMessage":"No prompt or metadata specified. Please provide information to append or metadata to update.","messagePattern":"No prompt or metadata specified\\. Please provide information to append or metadata to update\\.","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"mcp-server/src/core/direct-functions/update-subtask-by-id.js","lineNumber":72,"sourceCode":"\t\t// In file storage, subtask IDs must be in format \"parentId.subtaskId\"\n\t\t// The core function handles storage-specific validation\n\t\tif (!id || typeof id !== 'string' || !id.trim()) {\n\t\t\tconst errorMessage = 'Subtask ID cannot be empty.';\n\t\t\tlogWrapper.error(errorMessage);\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: { code: 'INVALID_SUBTASK_ID', message: errorMessage }\n\t\t\t};\n\t\t}\n\n\t\t// At least prompt or metadata is required (validated in MCP tool layer)\n\t\tif (!prompt && !metadata) {\n\t\t\tconst errorMessage =\n\t\t\t\t'No prompt or metadata specified. Please provide information to append or metadata to update.';\n\t\t\tlogWrapper.error(errorMessage);\n\t\t\treturn {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: { code: 'MISSING_PROMPT', message: errorMessage }\n\t\t\t};\n\t\t}\n\n\t\tconst subtaskIdStr = String(id).trim();\n\n\t\t// Use the provided path\n\t\tconst tasksPath = tasksJsonPath;\n\t\tconst useResearch = research === true;\n\n\t\tlog.info(\n\t\t\t`Updating subtask with ID ${subtaskIdStr} with prompt \"${prompt || '(metadata-only)'}\" and research: ${useResearch}`\n\t\t);\n\n\t\tconst wasSilent = isSilentMode();\n\t\tif (!wasSilent) {\n\t\t\tenableSilentMode();\n\t\t}\n","sourceCodeStart":54,"sourceCodeEnd":90,"githubUrl":"https://github.com/eyaltoledano/claude-task-master/blob/c0c98d367c55296bfe69e65680625b6db437af02/mcp-server/src/core/direct-functions/update-subtask-by-id.js#L54-L90","documentation":"updateSubtaskByIdDirect requires at least one of `prompt` (text appended to the subtask's details) or `metadata` (structured fields to update). When both are absent it returns MISSING_PROMPT because there is nothing to change. This mirrors validation done at the MCP tool layer but is repeated defensively in the direct function.","triggerScenarios":"Calling the tool with only an id, or with prompt: '' and metadata: null; a client that serializes only non-empty fields and drops an intentionally empty prompt.","commonSituations":"Agents intending to 'touch' or re-check a subtask without content; refactors that renamed the prompt field to something else so it no longer maps.","solutions":["Provide prompt with the text to append: { id: '5.2', prompt: 'Implemented retry logic; added tests.' }","Or provide metadata for structured updates: { id: '5.2', metadata: { status: 'done' } }.","If you truly want no content change, this is the wrong tool — use set-task-status instead."],"exampleFix":"// before\nawait updateSubtask({ id: '5.2' });\n// after\nawait updateSubtask({ id: '5.2', prompt: 'Added implementation notes and test results.' });","handlingStrategy":"validation","validationCode":"if (!(typeof prompt === 'string' && prompt.trim()) && !(metadata && typeof metadata === 'object')) {\n  throw new Error('Provide prompt (text to append) or metadata (fields to update)');\n}","typeGuard":"function hasUpdatePayload(a) { return (typeof a.prompt === 'string' && a.prompt.trim().length > 0) || (a.metadata !== null && typeof a.metadata === 'object'); }","tryCatchPattern":null,"preventionTips":["Decide intent first: append text -> prompt; change fields -> metadata; change status -> set-task-status tool","Do not strip empty-looking strings from arguments before checking payload requirements","Wrap common update flows in a helper that enforces prompt-or-metadata"],"tags":["mcp","validation","missing-argument"],"backgroundTag":"missing-required-parameter","analyzedSha":"c0c98d367c55296bfe69e65680625b6db437af02","analyzedAt":"2026-08-29T02:56:26.071Z","schemaVersion":2},"datasetVersion":"2026-08-29T07:17:48.351Z"}