Skip to main content
Glama

update

Modify multiple upcoming tasks (starting from a specified ID) by applying new context or changes described in the prompt. Suitable for batch updates in task management systems.

Instructions

Update multiple upcoming tasks (with ID >= 'from' ID) based on new context or changes provided in the prompt. Use 'update_task' instead for a single specific task or 'update_subtask' for subtasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileNoPath to the tasks file relative to project root
fromYesTask ID from which to start updating (inclusive). IMPORTANT: This tool uses 'from', not 'id'
projectRootNoThe directory of the project. (Optional, usually from session)
promptYesExplanation of changes or new context to apply
researchNoUse Perplexity AI for research-backed updates
tagNoTag context to operate on

Implementation Reference

  • The registerUpdateTool function that adds the 'update' tool to the MCP server, including name, description, parameters schema, and execute handler.
    export function registerUpdateTool(server) { server.addTool({ name: 'update', description: "Update multiple upcoming tasks (with ID >= 'from' ID) based on new context or changes provided in the prompt. Use 'update_task' instead for a single specific task or 'update_subtask' for subtasks.", parameters: z.object({ from: z .string() .describe( "Task ID from which to start updating (inclusive). IMPORTANT: This tool uses 'from', not 'id'" ), prompt: z .string() .describe('Explanation of changes or new context to apply'), research: z .boolean() .optional() .describe('Use Perplexity AI for research-backed updates'), file: z .string() .optional() .describe('Path to the tasks file relative to project root'), projectRoot: z .string() .optional() .describe( 'The directory of the project. (Optional, usually from session)' ), tag: z.string().optional().describe('Tag context to operate on') }), execute: withNormalizedProjectRoot(async (args, { log, session }) => { const toolName = 'update'; const { from, prompt, research, file, projectRoot, tag } = args; const resolvedTag = resolveTag({ projectRoot: args.projectRoot, tag: args.tag }); try { log.info( `Executing ${toolName} tool with normalized root: ${projectRoot}` ); let tasksJsonPath; try { tasksJsonPath = findTasksPath({ projectRoot, file }, log); log.info(`${toolName}: Resolved tasks path: ${tasksJsonPath}`); } catch (error) { log.error(`${toolName}: Error finding tasks.json: ${error.message}`); return createErrorResponse( `Failed to find tasks.json within project root '${projectRoot}': ${error.message}` ); } const result = await updateTasksDirect( { tasksJsonPath: tasksJsonPath, from: from, prompt: prompt, research: research, projectRoot: projectRoot, tag: resolvedTag }, log, { session } ); log.info( `${toolName}: Direct function result: success=${result.success}` ); return handleApiResult({ result, log: log, errorPrefix: 'Error updating tasks', projectRoot: args.projectRoot }); } catch (error) { log.error( `Critical error in ${toolName} tool execute: ${error.message}` ); return createErrorResponse( `Internal tool error (${toolName}): ${error.message}` ); } }) }); }
  • The core execute handler for the 'update' tool. Normalizes project root, resolves tasks path, calls updateTasksDirect core function, and handles response.
    execute: withNormalizedProjectRoot(async (args, { log, session }) => { const toolName = 'update'; const { from, prompt, research, file, projectRoot, tag } = args; const resolvedTag = resolveTag({ projectRoot: args.projectRoot, tag: args.tag }); try { log.info( `Executing ${toolName} tool with normalized root: ${projectRoot}` ); let tasksJsonPath; try { tasksJsonPath = findTasksPath({ projectRoot, file }, log); log.info(`${toolName}: Resolved tasks path: ${tasksJsonPath}`); } catch (error) { log.error(`${toolName}: Error finding tasks.json: ${error.message}`); return createErrorResponse( `Failed to find tasks.json within project root '${projectRoot}': ${error.message}` ); } const result = await updateTasksDirect( { tasksJsonPath: tasksJsonPath, from: from, prompt: prompt, research: research, projectRoot: projectRoot, tag: resolvedTag }, log, { session } ); log.info( `${toolName}: Direct function result: success=${result.success}` ); return handleApiResult({ result, log: log, errorPrefix: 'Error updating tasks', projectRoot: args.projectRoot }); } catch (error) { log.error( `Critical error in ${toolName} tool execute: ${error.message}` ); return createErrorResponse( `Internal tool error (${toolName}): ${error.message}` ); }
  • Zod schema defining the input parameters for the 'update' tool: from, prompt, research, file, projectRoot, tag.
    parameters: z.object({ from: z .string() .describe( "Task ID from which to start updating (inclusive). IMPORTANT: This tool uses 'from', not 'id'" ), prompt: z .string() .describe('Explanation of changes or new context to apply'), research: z .boolean() .optional() .describe('Use Perplexity AI for research-backed updates'), file: z .string() .optional() .describe('Path to the tasks file relative to project root'), projectRoot: z .string() .optional() .describe( 'The directory of the project. (Optional, usually from session)' ), tag: z.string().optional().describe('Tag context to operate on')
  • Entry in the central toolRegistry mapping the 'update' tool name to its registration function registerUpdateTool.
    update: registerUpdateTool,

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/eyaltoledano/claude-task-master'

If you have feedback or need assistance with the MCP directory API, please join our Discord server