Skip to main content
Glama

tasks_update

Update multiple tasks to a new status in bulk by ID. Returns a complete summary and prevents accidental modifications during mass updates.

Instructions

Update tasks in bulk by ID to a different status. Returns complete summary no need to call tasks_summary afterwards. Prevents AI accidentally rename or deleting tasks during mass updates, not even possible

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
source_idNoSource ID from task_setup() response - Defaults to most recent in the workspace if not provided - Try to always provide it! - If you don't have it, ask the user for a file path and call task_setup()
idsYesThe IDs of existing tasks
statusYesYou might need to infer it from the context: - "To Do" for tasks coming up next (e.g. "Do X next") - "In Progress" for what you'll do now (e.g. "First do X") - "Reminders" instructions for you (the AI) to be constantly reminded of - "Notes" to collect non-actionable notes - "Deleted" when they want these removed - Updating tasks to In Progress moves others to To Do, finishing a In Progress task moves the first Done to In Progress
indexNo0-based index to place the tasks. e.g.: - 0 for "Do this next" - Omit to place at the end ("Do this later")

Implementation Reference

  • Handler for the tasks_update tool (defined as 'update'). Resolves task IDs to texts, handles errors, and delegates to the add tool handler with an update context flag for special behavior.
    handler: (args, context = {}) => {
      const meta = metadata.load(args.source_id)
      const texts = args.ids.map((id) => {
        const task = meta.tasksByIdOrText[id]
        if (task) {
          return task.text
        }
        if (util.isId(id)) {
          throw new Error(`Task ID ${id} not found`)
        }
        // Assume the AI passed a text for a new task by mistake
        return id
      })
      // Use add internally also for DELETED
      return tools.add.handler({
        source_id: args.source_id,
        status: args.status,
        index: args.index,
        texts,
      }, { ...context, update: true })
    },
  • Zod input schema for the tasks_update tool, defining source_id, ids, status (including deleted), and optional index.
    schema: z.object({
      source_id: schemas.sourceId,
      ids: schemas.ids,
      status: z.union([schemas.status, z.literal(env.STATUS_DELETED)]).describe(util.trimLines(`
        ${schemas.status.description}
        - "${env.STATUS_DELETED}" when they want these removed
        ${env.AUTO_WIP ? `- Updating tasks to ${env.STATUS_WIP} moves others to ${env.STATUS_TODO}, finishing a ${env.STATUS_WIP} task moves the first ${env.STATUS_DONE} to ${env.STATUS_WIP}` : ''}
      `)),
      index: schemas.index,
    }),
  • src/tools.ts:117-151 (registration)
    Registration of the 'update' tool in the central tools object. The name is prefixed to 'tasks_update' by defineTool if PREFIX_TOOLS is enabled.
    update: defineTool('update', {
      schema: z.object({
        source_id: schemas.sourceId,
        ids: schemas.ids,
        status: z.union([schemas.status, z.literal(env.STATUS_DELETED)]).describe(util.trimLines(`
          ${schemas.status.description}
          - "${env.STATUS_DELETED}" when they want these removed
          ${env.AUTO_WIP ? `- Updating tasks to ${env.STATUS_WIP} moves others to ${env.STATUS_TODO}, finishing a ${env.STATUS_WIP} task moves the first ${env.STATUS_DONE} to ${env.STATUS_WIP}` : ''}
        `)),
        index: schemas.index,
      }),
      fromArgs: ([taskIds, status]) => ({ ids: split(taskIds) || [], status }),
      description: 'Update tasks in bulk by ID to a different status. Returns complete summary no need to call tasks_summary afterwards. Prevents AI accidentally rename or deleting tasks during mass updates, not even possible',
      handler: (args, context = {}) => {
        const meta = metadata.load(args.source_id)
        const texts = args.ids.map((id) => {
          const task = meta.tasksByIdOrText[id]
          if (task) {
            return task.text
          }
          if (util.isId(id)) {
            throw new Error(`Task ID ${id} not found`)
          }
          // Assume the AI passed a text for a new task by mistake
          return id
        })
        // Use add internally also for DELETED
        return tools.add.handler({
          source_id: args.source_id,
          status: args.status,
          index: args.index,
          texts,
        }, { ...context, update: true })
      },
    }),
  • src/server.ts:15-42 (registration)
    MCP server registration loop that adds all enabled tools from tools.ts (including tasks_update) to the FastMCP server instance.
    // Register all tools & resources
    for (const tool of Object.values(tools)) {
      if (!tool.isEnabled) {
        continue
      }
      if (tool.isResource) {
        // Register as resource
        server.addResource({
          uri: `resource://${tool.name}`,
          name: tool.description,
          mimeType: 'text/plain',
          load: () => cli.runTool(tool, []).then(text => ({ text })),
        })
      } else {
        // Register as tool with enhanced logging
        server.addTool({
          annotations: {
            openWorldHint: false, // This tool doesn't interact with external systems
            readOnlyHint: tool.isReadOnly,
            title: tool.name,
          },
          name: tool.name,
          description: tool.description,
          parameters: tool.schema,
          execute: (args) => cli.runTool(tool, args),
        })
      }
    }
  • Utility function to define tools, which prefixes the name with 'tasks_' (creating 'tasks_update' from 'update') if PREFIX_TOOLS environment variable is set.
    function defineTool<S extends ZodSchema>(name: string, tool: {
      schema: S
      description: string
      isResource?: boolean
      isReadOnly?: boolean
      isEnabled?: boolean
      handler: (args: z.infer<S>, context?: any) => any
      fromArgs: (args: string[]) => z.infer<S>
    }) {
      const toolName = env.PREFIX_TOOLS ? `tasks_${name}` : name
      return {
        ...tool,
        name: toolName,
        isResource: tool.isResource ?? false,
        isReadOnly: tool.isReadOnly ?? false,
        isEnabled: tool.isEnabled ?? true,
      }
    }
Behavior4/5

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

Annotations indicate readOnlyHint=false and openWorldHint=false, implying a mutation tool with closed-world behavior. The description adds valuable context beyond annotations: it specifies that the tool returns a complete summary, prevents accidental rename/deletion during mass updates, and explains side effects (e.g., updating to 'In Progress' moves others to 'To Do'). This enhances transparency about safety and operational behavior.

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

Conciseness4/5

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

The description is front-loaded with the core purpose and efficiently includes key behavioral details in two sentences. However, the second sentence is slightly verbose ('Prevents AI accidentally rename or deleting tasks during mass updates, not even possible'), which could be tightened without losing meaning. Overall, it's well-structured with minimal waste.

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

Completeness4/5

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

Given the tool's complexity (bulk mutation with side effects), annotations cover safety hints, and schema provides full parameter documentation, the description adds necessary context like summary returns and safety precautions. However, without an output schema, it could briefly mention the summary format. It's mostly complete but has a minor gap in output details.

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 parameters thoroughly. The description adds minimal parameter semantics beyond the schema, such as implying bulk updates via 'ids' and status changes, but doesn't provide additional syntax or format details. Baseline 3 is appropriate as the schema carries the primary burden.

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 with specific verb ('Update'), resource ('tasks in bulk by ID'), and scope ('to a different status'). It distinguishes from siblings by emphasizing bulk updates and preventing accidental rename/deletion, unlike tasks_add (adds new), tasks_search (finds), tasks_setup (prepares), and tasks_summary (summarizes).

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool ('Update tasks in bulk by ID to a different status') and mentions an alternative ('no need to call tasks_summary afterwards'), but it doesn't explicitly state when not to use it or compare with other update-related siblings like tasks_add for new tasks. The guidance is helpful but lacks explicit exclusions.

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

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/flesler/mcp-tasks'

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