Skip to main content
Glama

tb_create_board

Create a task board for a project. Optionally include tasks inline to create the board and all tasks in one atomic call, avoiding multiple individual task additions.

Instructions

Create a new task board for a project. Optionally include tasks inline to create board + all tasks in a single atomic call (avoids N separate tb_add_task calls).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectYesProject identifier (e.g. my-project)
nameYesBoard name
tasksNoOptional: tasks to create with the board. Each task: {title, description?, priority?, spec_ref?, acceptance_criteria?, dependencies?}. Dependencies reference other task titles or indices.

Implementation Reference

  • The `server.tool("tb_create_board", ...)` call registers and implements the tb_create_board tool. The handler function (lines 26-105) creates a new board in SQLite, optionally with inline tasks in a single atomic transaction. It generates a board ID, inserts the board row, and if tasks are provided, generates task IDs, resolves dependency references, and inserts all tasks within a transaction.
    server.tool(
      "tb_create_board",
      "Create a new task board for a project. Optionally include tasks inline to create board + all tasks in a single atomic call (avoids N separate tb_add_task calls).",
      {
        project: z.string().max(256).regex(/^[a-zA-Z0-9_.-]+$/).describe("Project identifier (e.g. my-project)"),
        name: z.string().max(256).describe("Board name"),
        tasks: z.array(TaskInputSchema).max(100).optional().describe("Optional: tasks to create with the board. Each task: {title, description?, priority?, spec_ref?, acceptance_criteria?, dependencies?}. Dependencies reference other task titles or indices."),
      },
      async ({ project, name, tasks }) => {
        const db = getDb();
        const boardId = generateId("board");
    
        if (!tasks || tasks.length === 0) {
          db.prepare(
            `INSERT INTO boards (id, project, name) VALUES (?, ?, ?)`
          ).run(boardId, project, name);
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify({ created: true, board_id: boardId, project, name, task_count: 0 }),
              },
            ],
          };
        }
    
        // Atomic: create board + all tasks in one transaction
        const insertBoard = db.prepare(
          `INSERT INTO boards (id, project, name) VALUES (?, ?, ?)`
        );
        const insertTask = db.prepare(
          `INSERT INTO tasks (id, board_id, title, description, priority, spec_ref, acceptance_criteria, dependencies, status)
           VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)`
        );
    
        const taskIds: string[] = [];
        const taskIdMap: Record<string, string> = {};
    
        // Pre-generate IDs so dependencies can reference them
        for (let i = 0; i < tasks.length; i++) {
          const id = generateId("task");
          taskIds.push(id);
          taskIdMap[tasks[i].title] = id;
          taskIdMap[String(i)] = id;
        }
    
        const tx = db.transaction(() => {
          insertBoard.run(boardId, project, name);
    
          for (let i = 0; i < tasks.length; i++) {
            const t = tasks[i];
            // Resolve dependency references (by title or index) to generated IDs
            const resolvedDeps = t.dependencies.map((dep) => taskIdMap[dep] || dep);
            // Tasks with no dependencies start as "ready", others as "backlog"
            const status = resolvedDeps.length === 0 ? "ready" : "backlog";
    
            insertTask.run(
              taskIds[i],
              boardId,
              t.title,
              t.description,
              t.priority,
              t.spec_ref || null,
              t.acceptance_criteria,
              JSON.stringify(resolvedDeps),
              status
            );
          }
        });
        tx();
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({
                created: true,
                board_id: boardId,
                project,
                name,
                task_count: tasks.length,
                task_ids: taskIds,
              }),
            },
          ],
        };
      }
    );
  • Input schema for tb_create_board: requires `project` (string matching /^[a-zA-Z0-9_.-]+$/, max 256), `name` (string, max 256), and optional `tasks` (array of TaskInputSchema, max 100). TaskInputSchema (lines 9-16) defines title, description, priority, spec_ref, acceptance_criteria, and dependencies.
    {
      project: z.string().max(256).regex(/^[a-zA-Z0-9_.-]+$/).describe("Project identifier (e.g. my-project)"),
      name: z.string().max(256).describe("Board name"),
      tasks: z.array(TaskInputSchema).max(100).optional().describe("Optional: tasks to create with the board. Each task: {title, description?, priority?, spec_ref?, acceptance_criteria?, dependencies?}. Dependencies reference other task titles or indices."),
    },
  • src/server.ts:18-23 (registration)
    The tool registration is triggered by `registerTaskBoardTools(server)` in createServer(), which calls the function that contains the server.tool("tb_create_board", ...) call.
      registerSddTools(server);
      registerTaskBoardTools(server);
      registerFileTools(server);
    
      return server;
    }
  • The `generateId` helper function generates unique IDs with a prefix (e.g., 'board-<uuid>'), used by tb_create_board to create board_id and task IDs.
    export function generateId(prefix: string = ""): string {
      const uuid = randomUUID().replace(/-/g, "");
      return prefix ? `${prefix}-${uuid}` : uuid;
    }
  • Database schema for the `boards` table (created via initSchema), which stores board rows with id, project, name, and timestamps.
    CREATE TABLE IF NOT EXISTS boards (
      id TEXT PRIMARY KEY,
      project TEXT NOT NULL,
      name TEXT NOT NULL,
      created_at TEXT NOT NULL DEFAULT (datetime('now')),
      updated_at TEXT NOT NULL DEFAULT (datetime('now'))
    );
Behavior3/5

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

With no annotations, the description carries the full burden. It mentions atomicity but omits details like state changes, failure behavior, or permission requirements. The description adds some context but not enough for complete transparency.

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 extremely concise: two sentences that front-load the primary purpose and then add the key benefit (batch atomic creation). No extraneous information.

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

Completeness4/5

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

Given the tool's complexity (3 parameters, nested tasks), the description covers the core functionality and batch option. It lacks explanation of return values or error handling, but the schema covers parameters well, so completeness is high but not maximal.

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 coverage is 100% with parameter descriptions. The description adds minimal value beyond the schema, mainly reiterating the batch feature. Per the guideline, baseline 3 is appropriate.

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 (create), resource (task board), and scope (for a project). It distinguishes from sibling tool tb_add_task by highlighting the inline batch creation feature, which avoids N separate calls.

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

Usage Guidelines4/5

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

The description explicitly mentions the batch creation option and contrasts with tb_add_task, guiding when to use this tool. However, it does not specify prerequisites or when not to use it (e.g., if board already exists).

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