Skip to main content
Glama

tb_unblocked

Lists tasks with no unresolved dependencies to identify work items ready for action.

Instructions

List all tasks that are ready to be worked on (no unresolved dependencies).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
board_idYesBoard ID

Implementation Reference

  • The server.tool() call for 'tb_unblocked' that registers the tool and implements the handler. It queries tasks with status 'ready' or 'backlog', filters out those whose dependencies are all in 'done' status, and returns the unblocked list.
    server.tool(
      "tb_unblocked",
      "List all tasks that are ready to be worked on (no unresolved dependencies).",
      {
        board_id: z.string().describe("Board ID"),
      },
      async ({ board_id }) => {
        const db = getDb();
        const tasks = db
          .prepare(`SELECT * FROM tasks WHERE board_id = ? AND status IN ('ready', 'backlog') ORDER BY
                    CASE priority WHEN 'p0' THEN 0 WHEN 'p1' THEN 1 WHEN 'p2' THEN 2 WHEN 'p3' THEN 3 END`)
          .all(board_id) as Record<string, unknown>[];
    
        const unblocked = tasks.filter((t) => {
          const deps = JSON.parse(t.dependencies as string) as string[];
          if (deps.length === 0) return true;
          const done = db
            .prepare(`SELECT COUNT(*) as c FROM tasks WHERE id IN (${deps.map(() => "?").join(",")}) AND status = 'done'`)
            .get(...deps) as Record<string, number>;
          return done.c === deps.length;
        });
    
        return {
          content: [
            {
              type: "text" as const,
              text: JSON.stringify({ board_id, unblocked_count: unblocked.length, tasks: unblocked }),
            },
          ],
        };
      }
  • TASK_STATUSES constant used by the tool to determine which statuses to query ('ready', 'backlog'), and TASK_PRIORITIES used for ordering results.
    export const TASK_STATUSES = [
      "backlog",
      "ready",
      "in_progress",
      "in_review",
      "done",
      "blocked",
    ] as const;
    
    export type TaskStatus = (typeof TASK_STATUSES)[number];
    
    export const TASK_PRIORITIES = ["p0", "p1", "p2", "p3"] as const;
    export type TaskPriority = (typeof TASK_PRIORITIES)[number];
  • src/server.ts:18-20 (registration)
    The registerTaskBoardTools(server) call in createServer() that registers all task board tools including 'tb_unblocked'.
    registerSddTools(server);
    registerTaskBoardTools(server);
    registerFileTools(server);
  • The getDb() helper function that provides the SQLite database connection used by the tool handler.
    export function getDb(): Database.Database {
      if (db) return db;
    
      fs.mkdirSync(path.dirname(DB_PATH), { recursive: true });
    
      db = new Database(DB_PATH);
      db.pragma("journal_mode = WAL");
      db.pragma("synchronous = normal");
      db.pragma("cache_size = -32000");
      db.pragma("temp_store = memory");
      db.pragma("busy_timeout = 5000");
      db.pragma("foreign_keys = ON");
    
      const versionInfo = db.prepare("SELECT sqlite_version() as version").get() as { version: string };
      console.error(`ForgeSpec MCP: SQLite ${versionInfo.version}, WAL mode enabled`);
    
      initSchema(db);
      return db;
    }
Behavior3/5

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

No annotations are provided, so the description carries the burden. It reveals the filtering criterion (no unresolved dependencies) but does not discuss order, pagination, error handling, or response details. Adequate but 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, front-loaded with the action ('List') and outcome ('tasks that are ready to be worked on'), with no extraneous information.

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?

The tool has no output schema, but the description does not indicate what fields the returned tasks contain. For a simple list tool, it is minimally adequate, but missing details on return structure reduces 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 coverage is 100% for the single parameter 'board_id', and the description does not add any additional meaning beyond 'Board ID'. Baseline 3 applies as descriptions adds no extra value over schema.

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 tool lists tasks that are ready to be worked on, with the qualifier 'no unresolved dependencies'. This distinguishes it from sibling tools like 'tb_get' (single task) or 'tb_status' (status changes).

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 implies use when wanting to see unblocked tasks, but does not explicitly state when not to use it or mention alternatives among siblings. Usage context is inferred rather than explicit.

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