Skip to main content
Glama
kazuph

@kazuph/mcp-taskmanager

by kazuph

add_tasks_to_request

Extend existing requests by adding new tasks within the MCP task management system. Automatically updates the progress table to include new tasks.

Instructions

Add new tasks to an existing request. This allows extending a request with additional tasks.

A progress table will be displayed showing all tasks including the newly added ones.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestIdYes
tasksYes

Implementation Reference

  • Core handler function in TaskManagerServer that adds new tasks to an existing request, generates IDs, updates persistence, and provides progress feedback.
    public async addTasksToRequest(
      requestId: string,
      tasks: { title: string; description: string }[]
    ) {
      await this.loadTasks();
      const req = this.data.requests.find((r) => r.requestId === requestId);
      if (!req) return { status: "error", message: "Request not found" };
      if (req.completed)
        return {
          status: "error",
          message: "Cannot add tasks to completed request",
        };
    
      const newTasks: Task[] = [];
      for (const taskDef of tasks) {
        this.taskCounter += 1;
        newTasks.push({
          id: `task-${this.taskCounter}`,
          title: taskDef.title,
          description: taskDef.description,
          done: false,
          approved: false,
          completedDetails: "",
        });
      }
    
      req.tasks.push(...newTasks);
      await this.saveTasks();
    
      const progressTable = this.formatTaskProgressTable(requestId);
      return {
        status: "tasks_added",
        message: `Added ${newTasks.length} new tasks to request.\n${progressTable}`,
        newTasks: newTasks.map((t) => ({
          id: t.id,
          title: t.title,
          description: t.description,
        })),
      };
    }
  • Zod schema for validating input to add_tasks_to_request tool.
    const AddTasksToRequestSchema = z.object({
      requestId: z.string(),
      tasks: z.array(
        z.object({
          title: z.string(),
          description: z.string(),
        })
      ),
    });
  • index.ts:225-248 (registration)
    Tool object definition registering the add_tasks_to_request tool with MCP, including name, description, and input schema.
    const ADD_TASKS_TO_REQUEST_TOOL: Tool = {
      name: "add_tasks_to_request",
      description:
        "Add new tasks to an existing request. This allows extending a request with additional tasks.\n\n" +
        "A progress table will be displayed showing all tasks including the newly added ones.",
      inputSchema: {
        type: "object",
        properties: {
          requestId: { type: "string" },
          tasks: {
            type: "array",
            items: {
              type: "object",
              properties: {
                title: { type: "string" },
                description: { type: "string" },
              },
              required: ["title", "description"],
            },
          },
        },
        required: ["requestId", "tasks"],
      },
    };
  • index.ts:683-696 (registration)
    Registration of all tools including add_tasks_to_request in the MCP server's listTools handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => ({
      tools: [
        REQUEST_PLANNING_TOOL,
        GET_NEXT_TASK_TOOL,
        MARK_TASK_DONE_TOOL,
        APPROVE_TASK_COMPLETION_TOOL,
        APPROVE_REQUEST_COMPLETION_TOOL,
        OPEN_TASK_DETAILS_TOOL,
        LIST_REQUESTS_TOOL,
        ADD_TASKS_TO_REQUEST_TOOL,
        UPDATE_TASK_TOOL,
        DELETE_TASK_TOOL,
      ],
    }));
  • MCP server dispatcher case that validates input with schema and invokes the addTasksToRequest handler.
    case "add_tasks_to_request": {
      const parsed = AddTasksToRequestSchema.safeParse(args);
      if (!parsed.success) {
        throw new Error(`Invalid arguments: ${parsed.error}`);
      }
      const { requestId, tasks } = parsed.data;
      const result = await taskManagerServer.addTasksToRequest(
        requestId,
        tasks
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
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 of behavioral disclosure. It mentions that 'A progress table will be displayed showing all tasks including the newly added ones,' which adds some context about the output behavior. However, it lacks critical details such as whether this operation requires specific permissions, if it's idempotent, what happens on errors, or any rate limits. For a mutation tool with zero annotation coverage, this is insufficient.

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 address the tool's function and output behavior. It's front-loaded with the core purpose, and the second sentence adds useful context without redundancy. However, it could be slightly more structured by explicitly listing parameters or usage scenarios.

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 complexity of a mutation tool with 2 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It covers the basic purpose and hints at output behavior but misses details on parameter meanings, error handling, permissions, and how it integrates with sibling tools. This leaves significant gaps for an AI agent to use it correctly.

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 0%, so the description must compensate for undocumented parameters. It implies the parameters are 'requestId' and 'tasks' (as it mentions adding tasks to an existing request), but doesn't explain their semantics, formats, or constraints beyond the basic idea. Since there are only 2 parameters, the baseline is higher, but the description adds minimal value over the schema, resulting in an adequate but not helpful score.

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 verb ('Add') and resource ('tasks to an existing request'), making the purpose understandable. It specifies this is for extending an existing request with additional tasks, which distinguishes it from creating a new request. However, it doesn't explicitly differentiate from sibling tools like 'update_task' or 'request_planning' beyond the 'add to existing' aspect.

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 minimal guidance by mentioning it's for 'extending a request with additional tasks,' which implies usage when more tasks are needed for an existing request. However, it doesn't specify when to use this tool versus alternatives like 'update_task' (which might modify existing tasks) or 'request_planning' (which might create new requests), nor does it mention prerequisites or 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

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/kazuph/mcp-taskmanager'

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