Skip to main content
Glama
vuluu2k
by vuluu2k

addTask

Create new tasks for today's list or backlog by specifying task descriptions and target locations in a structured knowledge base.

Instructions

Add a new task to today's list or the backlog

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYesThe task description
targetNoWhere to add the tasktoday

Implementation Reference

  • The core business logic that adds a task to either the 'today' or 'backlog' section, handling atomic updates and file creation.
    async addTask(text: string, target: "today" | "backlog"): Promise<Task> {
      const log = getLogger();
      const section: BrainSection = `tasks/${target}`;
    
      try {
        const result = await this.sync.atomicUpdate(
          section,
          (current) => appendTask(current, text),
          `feat(ai): add task to ${target}`
        );
        const tasks = parseTasks(result.content, section);
        log.info("addTask", { target, text });
        return tasks[tasks.length - 1];
      } catch (err) {
        if (isNotFound(err)) {
          const title = target === "today" ? "Today" : "Backlog";
          const content = `# ${title}\n\n- [ ] ${text}\n`;
          await this.sync.createSection(
            section,
            content,
            `feat(ai): create ${target} with new task`
          );
          log.info("addTask: created file", { target, text });
          const tasks = parseTasks(content, section);
          return tasks[tasks.length - 1];
  • Tool registration and interface for the 'addTask' MCP tool.
    server.registerTool(
      "addTask",
      {
        description: "Add a new task to today's list or the backlog",
        inputSchema: {
          text: z.string().describe("The task description"),
          target: z
            .enum(["today", "backlog"])
            .optional()
            .default("today")
            .describe("Where to add the task"),
        },
      },
      toolHandler("addTask", async ({ text, target }) => {
        const task = await brain.addTask(text, target);
        return { success: true, task };
      })
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool adds a task but doesn't cover permissions, whether the operation is idempotent, error conditions, or what happens on success (e.g., returns a task ID). For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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?

The description is a single, efficient sentence with zero waste, clearly front-loading the purpose. Every word earns its place, making it easy to parse quickly.

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?

Given the tool's moderate complexity (2 parameters, mutation operation) and no annotations or output schema, the description is minimally adequate. It states what the tool does but lacks details on behavior, output, or integration with siblings, leaving room for improvement in completeness.

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?

Schema description coverage is 100%, so the schema fully documents both parameters ('text' and 'target' with enum values). The description adds no additional meaning beyond what the schema provides, such as explaining the implications of choosing 'today' vs 'backlog'. Baseline 3 is appropriate when the schema does the heavy lifting.

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?

The description clearly states the action ('Add a new task') and the target resources ('today's list or the backlog'), which provides a specific verb+resource combination. However, it doesn't explicitly differentiate from sibling tools like 'saveToInbox' or 'markTaskDone', which might handle similar task-related operations.

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?

The description implies usage by mentioning 'today's list or the backlog' but provides no explicit guidance on when to use this tool versus alternatives like 'saveToInbox' or 'getTasks'. There are no prerequisites, exclusions, or clear context for choosing between the target options.

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

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