Skip to main content
Glama

update_task

Modify existing task details like description, priority, due dates, and tags while automatically assigning it to the requesting agent for exclusive editing.

Instructions

Update fields on an existing task. Auto-claims the task for the calling agent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesTask ID or UUID
agent_idYesGlobally unique agent identifier (e.g. "claude-opus-<uuid>"). Each agent instance MUST use a distinct ID to prevent collisions between parallel agents.
descriptionNoNew description
projectNoNew project
priorityNoPriority: H, M, or L
tagsYesTags to add
remove_tagsYesTags to remove
dueNoDate in any format Taskwarrior accepts (e.g. 2024-12-25, tomorrow, eow)
scheduledNoDate in any format Taskwarrior accepts (e.g. 2024-12-25, tomorrow, eow)
waitNoDate in any format Taskwarrior accepts (e.g. 2024-12-25, tomorrow, eow)
untilNoDate in any format Taskwarrior accepts (e.g. 2024-12-25, tomorrow, eow)
dependsYesUUIDs this task depends on

Implementation Reference

  • The `modifyTask` function executes the actual task modification by building arguments and running the 'task' CLI command.
    export async function modifyTask(id: string, fields: TaskFields, agentId: string): Promise<void> {
      const uuid = await ensureClaim(id, agentId);
      try {
        const args = buildModifyArgs(fields);
        await runCommand('task', [uuid, 'modify', ...args]);
      } catch (err) {
        throw new Error(`Failed to modify task ${id}: ${(err as Error).message}`);
      }
    }
  • src/index.ts:138-170 (registration)
    Registration of the 'update_task' tool including input schema definition and call to modifyTask handler.
    server.tool(
      'update_task',
      'Update fields on an existing task. Auto-claims the task for the calling agent.',
      {
        id: idParam,
        agent_id: agentIdParam,
        description: z.string().optional().describe('New description'),
        project: z.string().optional().describe('New project'),
        priority: priorityParam,
        tags: tagsParam,
        remove_tags: z.preprocess(coerceStringArray, z.array(z.string()).optional()).describe('Tags to remove'),
        due: dateParam,
        scheduled: dateParam,
        wait: dateParam,
        until: dateParam,
        depends: z.preprocess(coerceStringArray, z.array(z.string()).optional()).describe('UUIDs this task depends on'),
      },
      async ({ id, agent_id, remove_tags, ...fields }) => {
        try {
          await modifyTask(id, {
            description: fields.description,
            project: fields.project,
            priority: fields.priority as Priority | undefined,
            tags: fields.tags,
            removeTags: remove_tags,
            due: fields.due,
            scheduled: fields.scheduled,
            wait: fields.wait,
            until: fields.until,
            depends: fields.depends,
          }, agent_id);
          return { content: [{ type: 'text', text: `Task ${id} updated.` }] };
        } catch (err) {

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/maxronner/taskwarrior-mcp'

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