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,
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It mentions the tool updates 'multiple upcoming tasks' and uses a 'from' ID parameter, but doesn't disclose important behavioral traits like whether this is a destructive operation, what permissions are needed, how errors are handled, or what the response looks like. The description adds some context but leaves significant gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with only two sentences. The first sentence states the purpose and scope, the second provides clear usage guidelines. Every word earns its place with no redundancy or unnecessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (batch updates with 6 parameters) and lack of annotations/output schema, the description is incomplete. While it covers purpose and sibling differentiation well, it doesn't address behavioral aspects like mutation consequences, error handling, or response format that would be crucial for safe agent usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 6 parameters thoroughly. The description adds minimal value beyond the schema by mentioning the 'from' parameter in the purpose statement, but doesn't provide additional semantic context about how parameters interact or their practical usage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Update multiple upcoming tasks (with ID >= 'from' ID) based on new context or changes provided in the prompt.' It specifies the verb ('update'), resource ('multiple upcoming tasks'), scope ('with ID >= 'from' ID'), and distinguishes from siblings 'update_task' and 'update_subtask'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides usage guidelines: 'Use 'update_task' instead for a single specific task or 'update_subtask' for subtasks.' This clearly states when to use this tool versus alternatives, making it easy for an agent to select the correct tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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