Skip to main content
Glama

add_task_to_list

Add an existing task to a specified ClickUp list using task ID and list ID.

Instructions

Add an existing task to a ClickUp list.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesThe ID of the list to add the task to
task_idYesThe ID of the task to add

Implementation Reference

  • The handler function for the 'add_task_to_list' tool. It takes list_id and task_id, calls listsClient.addTaskToList(), and returns the result as JSON text.
    async ({ list_id, task_id }) => {
      try {
        const result = await listsClient.addTaskToList(list_id, task_id);
        return {
          content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
        };
      } catch (error: any) {
        console.error('Error adding task to list:', error);
        return {
          content: [{ type: 'text', text: `Error adding task to list: ${error.message}` }],
          isError: true
        };
      }
    }
  • The Zod schema defining the input parameters for 'add_task_to_list': list_id (string) and task_id (string), both required.
    'Add an existing task to a ClickUp list.',
    {
      list_id: z.string().describe('The ID of the list to add the task to'),
      task_id: z.string().describe('The ID of the task to add')
    },
  • Tool registration using server.tool() to register 'add_task_to_list' with description, schema, and handler.
    server.tool(
      'add_task_to_list',
      'Add an existing task to a ClickUp list.',
      {
        list_id: z.string().describe('The ID of the list to add the task to'),
        task_id: z.string().describe('The ID of the task to add')
      },
      async ({ list_id, task_id }) => {
        try {
          const result = await listsClient.addTaskToList(list_id, task_id);
          return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
          };
        } catch (error: any) {
          console.error('Error adding task to list:', error);
          return {
            content: [{ type: 'text', text: `Error adding task to list: ${error.message}` }],
            isError: true
          };
        }
      }
    );
  • The ListsClient.addTaskToList() method that makes the HTTP POST call to /list/{listId}/task/{taskId} on the ClickUp API.
    async addTaskToList(listId: string, taskId: string): Promise<{ success: boolean }> {
      return this.client.post(`/list/${listId}/task/${taskId}`);
    }
  • src/index.ts:40-47 (registration)
    The top-level setupTools() method that calls setupTaskTools(server), which registers all task tools including 'add_task_to_list'.
    private setupTools() {
      // Set up all tools
      setupTaskTools(this.server);
      setupDocTools(this.server);
      setupSpaceTools(this.server);
      setupChecklistTools(this.server);
      setupCommentTools(this.server);
    }
Behavior2/5

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

With no annotations, the description should disclose behavioral traits. It fails to mention mutation nature, potential error conditions (e.g., duplicate addition, permission requirements), or any side effects.

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?

Single sentence, no fluff, but could benefit from additional context. Still, it is appropriately sized for its simplicity.

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?

No output schema, and description omits details like return value, idempotency, or error behavior, leaving the agent under-informed for correct usage.

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 coverage is 100% for two parameters, so the description adds no additional meaning beyond the schema. Baseline score of 3 is appropriate.

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 adds an existing task to a list, using specific verb 'Add' and resource 'existing task' to 'ClickUp list', distinguishing it from siblings like 'create_task' and 'remove_task_from_list'.

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 on when to use this tool versus alternatives; no mention of prerequisites (e.g., task must exist, list compatibility) or when not to use it.

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/nsxdavid/clickup-mcp-server'

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