Skip to main content
Glama

get_tasks

Retrieve tasks from a ClickUp list by specifying the list ID and optional limit to manage and organize task data.

Instructions

Get tasks from a ClickUp list

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
list_idYesClickUp List ID
limitNoNumber of tasks to retrieve (max 100)

Implementation Reference

  • The async getTasks function implementing the core logic of the 'get_tasks' tool: fetches tasks from ClickUp API for given list_id (limit optional), formats as JSON, handles Axios errors.
    const getTasks = async (args: any) => { try { const response = await clickupApi.get(`/list/${args.list_id}/task`, { params: { limit: args.limit || 50, }, }); return { content: [ { type: "text", text: JSON.stringify(response.data.tasks, null, 2), }, ], }; } catch (error) { if (axios.isAxiosError(error)) { return { content: [ { type: "text", text: `ClickUp API error: ${error.response?.data?.err ?? error.message}`, }, ], isError: true, }; } throw error; } };
  • Schema definition for the 'get_tasks' tool, specifying input parameters list_id (required) and optional limit.
    get_tasks: { description: "Get tasks from a ClickUp list", inputSchema: { type: "object", properties: { list_id: { type: "string", description: "ClickUp List ID" }, limit: { type: "number", description: "Number of tasks to retrieve (max 100)", default: 50, minimum: 1, maximum: 100 } }, required: ["list_id"] } },
  • src/index.ts:279-294 (registration)
    Registration of tool handlers via setRequestHandler for CallToolRequestSchema, including the switch case dispatching 'get_tasks' calls to the getTasks function.
    server.setRequestHandler(CallToolRequestSchema, async (request) => { // @ts-ignore const { name, arguments: args } = request.params; switch (name) { case 'get_tasks': return await getTasks(args); case 'create_task': return await createTask(args); case 'update_task': return await updateTask(args); case 'get_task': return await getTask(args); default: throw new Error(`Unknown tool: ${name}`); } });

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

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