Skip to main content
Glama
jakedx6
by jakedx6

list_tasks

Retrieve and filter tasks by project, initiative, status, assignee, or search criteria to manage project workflows effectively.

Instructions

List tasks with optional filtering by project, initiative, status, or assignee

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoFilter tasks by project ID
initiative_idNoFilter tasks by initiative ID
statusNoFilter tasks by status
assignee_idNoFilter tasks by assignee
searchNoSearch tasks by title or description
limitNoMaximum number of tasks to return

Implementation Reference

  • The main handler function for the list_tasks tool. Parses input arguments using Zod schema, queries tasks from Supabase service with optional filters (project_id, status, assignee_id, search), applies client-side filtering for initiative_id, and returns filtered tasks list with total count and applied filters.
    export const listTasks = requireAuth(async (args: any) => { const { project_id, initiative_id, status, assignee_id, search, limit } = ListTasksSchema.parse(args) logger.info('Listing tasks', { project_id, initiative_id, status, assignee_id, search, limit }) let tasks = await supabaseService.getTasks( { project_id, status, assignee_id, search }, { limit }, { field: 'updated_at', order: 'desc' } ) // Filter by initiative_id if provided (since API doesn't support it directly yet) if (initiative_id) { tasks = tasks.filter(task => task.initiative_id === initiative_id) } return { tasks, total: tasks.length, filters_applied: { project_id, initiative_id, status, assignee_id, search } } })
  • Zod input validation schema used by the list_tasks handler to parse and validate tool arguments.
    const ListTasksSchema = z.object({ project_id: z.string().uuid().optional(), initiative_id: z.string().uuid().optional(), status: z.enum(['todo', 'in_progress', 'done']).optional(), assignee_id: z.string().uuid().optional(), search: z.string().optional(), limit: z.number().int().positive().max(100).default(20) })
  • MCPTool definition object registering the list_tasks tool with its name, description, and JSON input schema for the Model Context Protocol.
    export const listTasksTool: MCPTool = { name: 'list_tasks', description: 'List tasks with optional filtering by project, initiative, status, or assignee', inputSchema: { type: 'object', properties: { project_id: { type: 'string', format: 'uuid', description: 'Filter tasks by project ID' }, initiative_id: { type: 'string', format: 'uuid', description: 'Filter tasks by initiative ID' }, status: { type: 'string', enum: ['todo', 'in_progress', 'done'], description: 'Filter tasks by status' }, assignee_id: { type: 'string', format: 'uuid', description: 'Filter tasks by assignee' }, search: { type: 'string', description: 'Search tasks by title or description' }, limit: { type: 'number', minimum: 1, maximum: 100, default: 20, description: 'Maximum number of tasks to return' } } } }
  • Export of taskHandlers object that maps the 'list_tasks' name to the listTasks handler function, imported and spread into the main allHandlers in src/index.ts for MCP tool call dispatching.
    export const taskHandlers = { list_tasks: listTasks, create_task: createTask, get_task: getTask, update_task: updateTask, add_task_dependency: addTaskDependency, get_task_dependencies: getTaskDependencies, create_task_workflow: createTaskWorkflow, bulk_update_tasks: bulkUpdateTasks, get_task_workflow_status: getTaskWorkflowStatus
  • src/index.ts:143-155 (registration)
    In the main MCP server constructor, taskHandlers (containing list_tasks) is spread into the central allHandlers object used for dynamic tool execution in CallToolRequestHandler.
    this.allHandlers = { ...projectHandlers, ...taskHandlers, ...documentHandlers, ...conversationHandlers, ...contextAggregationHandlers, ...workflowAutomationHandlers, ...intelligentSearchHandlers, ...analyticsInsightsHandlers, ...initiativeHandlers, ...promptToProjectTools.reduce((acc, tool) => ({ ...acc, [tool.name]: tool.handler }), {}), ...debugHandlers, }

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/jakedx6/helios9-MCP-Server'

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