Skip to main content
Glama
vuluu2k
by vuluu2k

getTasks

Retrieve organized tasks from your knowledge base, grouped by file with details like status, priority, and due dates for today or backlog sections.

Instructions

Get all tasks grouped by file (today + backlog). Returns tasks with id, text, status, tags, priority, dueDate.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sectionNoWhich task section to retrieveall

Implementation Reference

  • The actual implementation of the getTasks logic that reads and parses tasks from a specific brain section.
    async getTasks(section: "today" | "backlog"): Promise<Task[]> {
      const log = getLogger();
      const brainSection: BrainSection = `tasks/${section}`;
      try {
        const file = await this.sync.readSection(brainSection);
        const tasks = parseTasks(file.content, brainSection);
        log.info("getTasks", { section, count: tasks.length });
        return tasks;
      } catch (err) {
        if (isNotFound(err)) return [];
        throw err;
      }
    }
  • Registration of the "getTasks" MCP tool, including its schema definition and handler invocation.
    server.registerTool(
      "getTasks",
      {
        description:
          "Get all tasks grouped by file (today + backlog). Returns tasks with id, text, status, tags, priority, dueDate.",
        inputSchema: {
          section: z
            .enum(["today", "backlog", "all"])
            .optional()
            .default("all")
            .describe("Which task section to retrieve"),
        },
      },
      toolHandler("getTasks", async ({ section }) => {
        if (section === "all") return brain.getAllTasks();
        return brain.getTasks(section);
      })
    );

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/vuluu2k/knowledge_mcp'

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