Skip to main content
Glama
awwaiid
by awwaiid

get_next_tasks

Retrieve pending tasks organized by project or tags using the TaskWarrior MCP Server to streamline task management and prioritize next actions effectively.

Instructions

Get a list of all pending tasks

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectNo
tagsNo

Implementation Reference

  • Handler for get_next_tasks tool: parses input with listPendingTasksRequest schema, constructs taskwarrior command with optional project/tags filters, executes 'task ... next' via execSync, returns output as text content.
    case "get_next_tasks": { const parsed = listPendingTasksRequest.safeParse(args); if (!parsed.success) { throw new Error(`Invalid arguments for get_next_tasks: ${parsed.error}`); } let task_args = []; if (parsed.data.tags) { for(let tag of parsed.data.tags) { task_args.push(`+${tag}`); } } if (parsed.data.project) { task_args.push(`project:${parsed.data.project}`); } const content = execSync(`task limit: ${task_args.join(" ")} next`, { maxBuffer: 1024 * 1024 * 10 }).toString().trim(); return { content: [{ type: "text", text: content }], }; }
  • Input schema for get_next_tasks: optional project (regex validated) and tags array (each tag regex a-z). Used for validation and converted to JSON schema for tool registration.
    const listPendingTasksRequest = z.object({ project: z.string().regex(/^[a-z.]+$/).optional(), tags: z.array(z.string().regex(/^a-z$/)).optional(), });
  • index.ts:96-100 (registration)
    Tool registration in ListTools response: defines name, description, and inputSchema from listPendingTasksRequest.
    { name: "get_next_tasks", description: "Get a list of all pending tasks", inputSchema: zodToJsonSchema(listPendingTasksRequest) as ToolInput, },

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/awwaiid/mcp-server-taskwarrior'

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