Skip to main content
Glama

add_task

Add tasks to your todo list with titles, priorities, and estimated Pomodoro sessions to organize work and track productivity.

Instructions

Add a new task to the todo list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTask title
descriptionNoTask description
priorityYesTask priority
estimatedPomodorosYesEstimated number of pomodoros needed

Implementation Reference

  • Executes the add_task tool: creates a new Task from input arguments, appends it to the tasks list, persists data to file, and returns a success response with the new task.
    case "add_task": {
      const task: Task = {
        id: Date.now().toString(),
        title: args.title as string,
        description: args.description as string,
        status: "pending",
        priority: args.priority as "low" | "medium" | "high",
        estimatedPomodoros: args.estimatedPomodoros as number,
        completedPomodoros: 0,
        createdAt: new Date().toISOString(),
      };
      data.tasks.push(task);
      saveData(data);
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(
              { success: true, task, message: "Task added successfully" },
              null,
              2
            ),
          },
        ],
      };
    }
  • Defines the tool metadata including name, description, and input schema for validating add_task parameters.
    {
      name: "add_task",
      description: "Add a new task to the todo list",
      inputSchema: {
        type: "object",
        properties: {
          title: { type: "string", description: "Task title" },
          description: { type: "string", description: "Task description" },
          priority: {
            type: "string",
            enum: ["low", "medium", "high"],
            description: "Task priority",
          },
          estimatedPomodoros: {
            type: "number",
            description: "Estimated number of pomodoros needed",
          },
        },
        required: ["title", "priority", "estimatedPomodoros"],
      },
    },
  • src/index.ts:245-247 (registration)
    Registers the list tools handler which exposes the add_task tool (among others) via the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: TOOLS,
    }));
  • TypeScript interface defining the structure of a Task, used in the add_task handler.
    interface Task {
      id: string;
      title: string;
      description?: string;
      status: "pending" | "in-progress" | "completed";
      priority: "low" | "medium" | "high";
      estimatedPomodoros: number;
      completedPomodoros: number;
      createdAt: string;
      completedAt?: string;
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool adds a task but doesn't cover critical aspects like whether this requires authentication, what happens on success/failure (e.g., returns a task ID or confirmation), rate limits, or side effects (e.g., if it triggers notifications). For a mutation tool with zero annotation coverage, this 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 a single, clear sentence with zero waste—it directly states the tool's purpose without redundancy or fluff. It's appropriately sized for a simple creation tool and front-loaded with the essential action, making it easy for an agent to parse quickly.

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 the tool's complexity (a mutation with 4 parameters, no annotations, and no output schema), the description is incomplete. It doesn't explain return values (e.g., what the tool outputs after adding a task), error conditions, or behavioral nuances. For a tool that modifies state, this lack of context could lead to incorrect agent usage or assumptions.

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?

The schema description coverage is 100%, with all parameters well-documented in the schema (e.g., 'title', 'description', 'priority' with enum values, 'estimatedPomodoros'). The description adds no parameter-specific information beyond implying a 'task' is created. This meets the baseline of 3 since the schema does the heavy lifting, but the description doesn't compensate with additional context like default values or usage examples.

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 ('Add') and resource ('new task to the todo list'), making the purpose immediately understandable. It distinguishes from siblings like 'delete_task' or 'update_task' by specifying creation rather than modification or removal. However, it doesn't explicitly differentiate from all siblings (e.g., 'list_tasks' is clearly different, but the distinction could be more explicit).

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., whether a todo list must exist), when not to use it (e.g., for updating existing tasks), or direct alternatives like 'update_task' for modifications. The agent must infer usage from the name and context alone.

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/PratyayRajak/todopomo-mcp'

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