Skip to main content
Glama
Leanware-io

ClickUp MCP Integration

by Leanware-io

clickup_get_task

Retrieve a specific ClickUp task by its ID to access task details and information within your workspace.

Instructions

Get a task by its ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
task_idYes

Implementation Reference

  • Tool definition including name, description, input schema, and handler function for 'clickup_get_task'. The handler extracts task_id and calls taskService.getTask().
    const getTaskTool = defineTool((z) => ({
      name: "clickup_get_task",
      description: "Get a task by its ID",
      inputSchema: {
        task_id: z.string(),
      },
      handler: async (input) => {
        const { task_id } = input;
        const response = await taskService.getTask(task_id);
        return {
          content: [{ type: "text", text: JSON.stringify(response) }],
        };
      },
    }));
  • Core implementation of fetching a task from ClickUp API using the private request method.
    async getTask(taskId: string): Promise<ClickUpTask> {
      return this.request<ClickUpTask>(
        `/task/${taskId}?custom_task_ids=false&team_id=${this.workspaceId}&include_subtasks=true&include_markdown_description=true`
      );
    }
  • src/index.ts:89-91 (registration)
    Registers the 'clickup_get_task' tool (along with others) on the MCP server by iterating over the tools array and calling server.tool.
    tools.forEach((tool) => {
      server.tool(tool.name, tool.description, tool.inputSchema, tool.handler);
    });
  • Zod input schema defining the required 'task_id' string parameter.
    inputSchema: {
      task_id: z.string(),
    },
  • Private request helper method used by getTask to make HTTP requests to ClickUp API.
    private async request<T>(
      endpoint: string,
      options: RequestInit = {}
    ): Promise<T> {
      const response = await fetch(`${BASE_URL}${endpoint}`, {
        ...options,
        headers: this.headers,
      });
      return response.json();
    }

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

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