Skip to main content
Glama

plan_tasks

Generate and organize multiple tasks from a structured plan, assign IDs, prioritize, add deadlines, tags, and dependencies, and sync with a knowledge graph for efficient task management.

Instructions

Create multiple tasks from a plan. Generates IDs and syncs with knowledge graph.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tasksYesList of tasks to create with their details

Implementation Reference

  • The execute handler for plan_tasks tool. Parses input parameters using PlanTasksSchema, iterates over tasks to create them via taskStorage.add(), handles errors per task, and returns list of created tasks.
    execute: async (params: any) => {
      try {
        // Validate input parameters
        const validatedParams = PlanTasksSchema.parse(params);
        const createdTasks = [];
        
        for (const task of validatedParams.tasks) {
          try {
            const newTask = taskStorage.add({
              description: task.description,
              status: task.status || "todo",
              priority: task.priority || "medium",
              due: task.due,
              tags: task.tags || [],
              dependsOn: task.dependsOn || []
            });
            createdTasks.push(newTask);
          } catch (error) {
            return JSON.stringify({ 
              error: `Failed to create task: ${error instanceof Error ? error.message : String(error)}`,
              task: task
            });
          }
        }
        
        return JSON.stringify({ 
          tasks: createdTasks,
          message: `Created ${createdTasks.length} tasks`
        });
      } catch (error) {
        return JSON.stringify({ 
          error: `Invalid task parameters: ${error instanceof Error ? error.message : String(error)}`
        });
      }
    }
  • Zod schema PlanTasksSchema defining the input parameters for plan_tasks: an array of task objects with required description and optional status, dependsOn, due, priority, tags.
    // Schema for plan_tasks parameters
    const PlanTasksSchema = z.object({
      tasks: z.array(
        z.object({
          description: z.string().min(3, "Description must be at least 3 characters"),
          status: TaskStatusEnum.optional(),
          dependsOn: z.array(z.string().uuid()).optional(),
          due: z.string().datetime().optional(),
          priority: TaskPriorityEnum.optional(),
          tags: z.array(z.string()).optional()
        })
      )
    });
  • Registers the plan_tasks tool on the FastMCP server instance using server.addTool(), providing name, description, and the execute handler.
    server.addTool({
      name: "plan_tasks",
      description: "Create multiple tasks from a plan. Generates IDs and syncs with knowledge graph.",
      execute: async (params: any) => {
        try {
          // Validate input parameters
          const validatedParams = PlanTasksSchema.parse(params);
          const createdTasks = [];
          
          for (const task of validatedParams.tasks) {
            try {
              const newTask = taskStorage.add({
                description: task.description,
                status: task.status || "todo",
                priority: task.priority || "medium",
                due: task.due,
                tags: task.tags || [],
                dependsOn: task.dependsOn || []
              });
              createdTasks.push(newTask);
            } catch (error) {
              return JSON.stringify({ 
                error: `Failed to create task: ${error instanceof Error ? error.message : String(error)}`,
                task: task
              });
            }
          }
          
          return JSON.stringify({ 
            tasks: createdTasks,
            message: `Created ${createdTasks.length} tasks`
          });
        } catch (error) {
          return JSON.stringify({ 
            error: `Invalid task parameters: ${error instanceof Error ? error.message : String(error)}`
          });
        }
      }
    });
Behavior2/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 'Generates IDs and syncs with knowledge graph', which adds some behavioral context beyond basic creation. However, it doesn't cover critical aspects like whether this is a write operation (implied but not stated), error handling, permissions needed, or what 'syncs' entails in practice.

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 concise with two sentences that directly state the purpose and key behaviors. It's front-loaded with the main action and avoids unnecessary details. However, it could be slightly more structured by explicitly separating purpose from side effects.

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

Completeness2/5

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

Given no annotations and no output schema, the description is incomplete for a tool that creates multiple tasks. It doesn't explain what is returned (e.g., success status, created task IDs), error conditions, or how the knowledge graph sync works. For a write operation with potential complexity, this leaves significant gaps.

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 fully documents the 'tasks' parameter and its nested properties. The description adds no additional parameter semantics beyond what's in the schema, such as explaining the structure or usage of the 'tasks' list. This meets the baseline for high schema coverage.

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

Purpose4/5

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

The description clearly states the action ('Create multiple tasks from a plan') and the resource ('tasks'), with additional context about generating IDs and syncing with a knowledge graph. However, it doesn't explicitly differentiate from sibling tools like 'list_tasks' or 'update_tasks', which would require more specific scope or usage context.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify whether this is for bulk creation versus single-task creation (if such a tool exists), or when to use it over 'update_tasks' or 'list_tasks'. The description lacks context about prerequisites or typical scenarios.

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/flight505/mcp-think-tank'

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