Skip to main content
Glama

list_tasks

Retrieve tasks from the task-mcp server with filtering options for status, project, tags, or priority. View claim metadata including owner agent and lease details for each task.

Instructions

List tasks, optionally filtered by status, project, tags, or priority. Returns claim metadata (owner_agent, lease_until, claimed_at, last_renewed_at) for each task.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter by status (default: pending)
projectNoFilter by project name
tagsYesTags to add
priorityNoPriority: H, M, or L
due_beforeNoDate in any format Taskwarrior accepts (e.g. 2024-12-25, tomorrow, eow)
due_afterNoDate in any format Taskwarrior accepts (e.g. 2024-12-25, tomorrow, eow)

Implementation Reference

  • The handler logic for the 'list_tasks' MCP tool in src/index.ts.
    async (params) => {
      try {
        const tasks = await exportTasks({
          status: params.status as TaskStatus | 'all' | undefined,
          project: params.project,
          tags: params.tags,
          priority: params.priority as Priority | undefined,
          dueBefore: params.due_before,
          dueAfter: params.due_after,
        });
        return { content: [{ type: 'text', text: JSON.stringify(tasks, null, 2) }] };
      } catch (err) {
        return { content: [{ type: 'text', text: (err as Error).message }], isError: true };
      }
    },
  • The implementation of exportTasks which performs the task listing by calling the taskwarrior CLI.
    export async function exportTasks(filter: FilterParams = {}): Promise<Task[]> {
      try {
        const filterArgs = buildFilterArgs(filter);
        const output = await runCommand('task', [...filterArgs, 'export']);
        return JSON.parse(output) as Task[];
      } catch (err) {
        throw new Error(`Failed to export tasks: ${(err as Error).message}`);
      }
    }
  • src/index.ts:48-77 (registration)
    Registration of the 'list_tasks' tool.
    server.tool(
      'list_tasks',
      'List tasks, optionally filtered by status, project, tags, or priority. Returns claim metadata (owner_agent, lease_until, claimed_at, last_renewed_at) for each task.',
      {
        status: z
          .enum(['pending', 'completed', 'deleted', 'waiting', 'recurring', 'all'])
          .optional()
          .describe('Filter by status (default: pending)'),
        project: z.string().optional().describe('Filter by project name'),
        tags: tagsParam,
        priority: priorityParam,
        due_before: dateParam,
        due_after: dateParam,
      },
      async (params) => {
        try {
          const tasks = await exportTasks({
            status: params.status as TaskStatus | 'all' | undefined,
            project: params.project,
            tags: params.tags,
            priority: params.priority as Priority | undefined,
            dueBefore: params.due_before,
            dueAfter: params.due_after,
          });
          return { content: [{ type: 'text', text: JSON.stringify(tasks, null, 2) }] };
        } catch (err) {
          return { content: [{ type: 'text', text: (err as Error).message }], isError: true };
        }
      },
    );
Behavior3/5

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

Since no annotations are provided, description carries full disclosure burden. It valuably discloses return structure (claim metadata fields: owner_agent, lease_until, etc.), revealing this is a claimed-task system. However, it omits safety properties (read-only?), pagination behavior, or 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with zero waste. First sentence establishes purpose and filtering; second sentence discloses return value structure. Information is front-loaded and every clause earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter tool with no output schema, the description covers basic filtering and return metadata. However, it lacks pagination details, doesn't explain why 'tags' is required (unusual for a list operation), and doesn't describe the array structure or total count of returned results.

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?

With 100% schema description coverage, baseline is 3. The description mentions four filter categories (status, project, tags, priority) but misses 'due_before' and 'due_after'. It adds semantic grouping ('optionally filtered') but doesn't compensate for schema limitations or explain the unusual required 'tags' constraint.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States specific verb ('List') and resource ('tasks') clearly. Mentions filtering capabilities (status, project, tags, priority) which helps distinguish from sibling 'get_task' (implied single retrieval vs multiple), though it could explicitly clarify 'list' vs 'get' distinction in the text.

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 explicit guidance on when to use this versus 'get_task' for single-task retrieval, or when filtering is preferable to fetching all tasks. No mention of prerequisites or performance considerations for large task lists.

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

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