Skip to main content
Glama

tb_add_task

Adds a task to a board, requiring a spec reference and acceptance criteria for traceable, spec-driven development.

Instructions

Add a task to an existing board. Every task should reference a spec and have acceptance criteria.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
board_idYesBoard ID
titleYesTask title
descriptionNoTask description
priorityNoPriority: p0 (critical), p1 (high), p2 (medium), p3 (low)p2
spec_refNoReference to spec document
acceptance_criteriaNoAcceptance criteria for completion
dependenciesNoTask IDs this task depends on

Implementation Reference

  • The tb_add_task tool handler: registers an MCP tool that adds a task to an existing board. Validates board existence, generates a task ID, inserts into the tasks table, and returns the created task details.
    // ── Add Task ───────────────────────────────────────
    server.tool(
      "tb_add_task",
      "Add a task to an existing board. Every task should reference a spec and have acceptance criteria.",
      {
        board_id: z.string().max(256).describe("Board ID"),
        title: z.string().min(3).max(512).describe("Task title"),
        description: z.string().max(65536).default("").describe("Task description"),
        priority: z.enum(TASK_PRIORITIES).default("p2").describe("Priority: p0 (critical), p1 (high), p2 (medium), p3 (low)"),
        spec_ref: z.string().max(512).optional().describe("Reference to spec document"),
        acceptance_criteria: z.string().max(65536).default("").describe("Acceptance criteria for completion"),
        dependencies: z.array(z.string()).default([]).describe("Task IDs this task depends on"),
      },
      async ({ board_id, title, description, priority, spec_ref, acceptance_criteria, dependencies }) => {
        const db = getDb();
    
        const board = db.prepare(`SELECT id FROM boards WHERE id = ?`).get(board_id);
        if (!board) {
          return {
            content: [{ type: "text" as const, text: JSON.stringify({ error: `Board ${board_id} not found` }) }],
          };
        }
    
        const id = generateId("task");
        db.prepare(
          `INSERT INTO tasks (id, board_id, title, description, priority, spec_ref, acceptance_criteria, dependencies)
           VALUES (?, ?, ?, ?, ?, ?, ?, ?)`
        ).run(id, board_id, title, description, priority, spec_ref || null, acceptance_criteria, JSON.stringify(dependencies));
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({ created: true, task_id: id, board_id, title, priority }),
            },
          ],
        };
      }
    );
  • Input schema for tb_add_task: defines board_id, title, description, priority, spec_ref, acceptance_criteria, and dependencies parameters with Zod validation.
    {
      board_id: z.string().max(256).describe("Board ID"),
      title: z.string().min(3).max(512).describe("Task title"),
      description: z.string().max(65536).default("").describe("Task description"),
      priority: z.enum(TASK_PRIORITIES).default("p2").describe("Priority: p0 (critical), p1 (high), p2 (medium), p3 (low)"),
      spec_ref: z.string().max(512).optional().describe("Reference to spec document"),
      acceptance_criteria: z.string().max(65536).default("").describe("Acceptance criteria for completion"),
      dependencies: z.array(z.string()).default([]).describe("Task IDs this task depends on"),
    },
  • Registration of the tb_add_task tool via server.tool() on line 109, inside registerTaskBoardTools().
    server.tool(
  • src/server.ts:18-20 (registration)
    registerTaskBoardTools(server) is called in createServer() which registers all task board tools including tb_add_task.
    registerSddTools(server);
    registerTaskBoardTools(server);
    registerFileTools(server);
  • generateId helper used by tb_add_task to create unique task IDs with a 'task-' prefix.
    export function generateId(prefix: string = ""): string {
      const uuid = randomUUID().replace(/-/g, "");
      return prefix ? `${prefix}-${uuid}` : uuid;
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. It only states that the tool adds a task, implying mutation, but does not disclose permissions, side effects, or prerequisites (e.g., board must exist). The behavioral disclosure is minimal.

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 sentence with two clear statements. It is concise and front-loaded with no wasted words.

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

Completeness2/5

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

Given 7 parameters and no output schema, the description is very brief. It does not explain return values (e.g., created task ID), error conditions, or prerequisites beyond implying board existence. The tool is moderately complex, so the description is incomplete.

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 baseline is 3. The description adds value by emphasizing spec_ref and acceptance_criteria, but does not go beyond what the schema already provides for each parameter.

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

Purpose5/5

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

The description clearly states the verb 'Add' and the resource 'task to an existing board', and it adds important context that tasks should reference a spec and have acceptance criteria. This distinguishes it from sibling tools like tb_create_board or tb_get.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides a 'should' guideline (reference a spec and acceptance criteria) but does not explicitly state when to use or not use this tool, nor does it mention alternatives for creating boards or other task operations.

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/lleontor705/forgespec-mcp'

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