Skip to main content
Glama

board_get_projects

List all projects with task counts by status. Use at session start to discover available project IDs before creating tasks or sessions, sorted by priority descending.

Instructions

List all projects with per-status task counts. Call this at session start to discover available projects before creating tasks or sessions — the returned IDs are required inputs to board_create_session, board_create_task, and most other tools. Results are sorted by priority descending (critical → low), then updated_at descending as tiebreaker. Projects without an explicit priority are treated as 'medium' for sort purposes (backward compat). Each entry includes: id, name, description, status, priority, metadata, ISO-formatted created_at/updated_at, task_counts (e.g., {todo: 3, in_progress: 1, done: 12}), and total_tasks. Use this over board_get_tasks when you don't yet know which project to target.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
statusNoFilter to a single status. Omit to return all projects regardless of status. Typical usage: 'active' for current work; 'paused' for projects intentionally on hold pending capacity or dependency; archived projects are usually hidden from day-to-day views.

Implementation Reference

  • The 'board_get_projects' tool handler function. Registered via server.tool(), it queries Firestore's 'projects' collection, optionally filters by status, fetches per-project task counts, sorts by priority then updated_at, and returns the result as JSON.
    export function registerProjectTools(server: McpServer, db: Firestore) {
      server.tool(
        "board_get_projects",
        "List all projects with per-status task counts. Call this at session start to discover available projects before creating tasks or sessions — the returned IDs are required inputs to board_create_session, board_create_task, and most other tools. Results are sorted by priority descending (critical → low), then updated_at descending as tiebreaker. Projects without an explicit priority are treated as 'medium' for sort purposes (backward compat). Each entry includes: id, name, description, status, priority, metadata, ISO-formatted created_at/updated_at, task_counts (e.g., {todo: 3, in_progress: 1, done: 12}), and total_tasks. Use this over board_get_tasks when you don't yet know which project to target.",
        {
          status: z
            .enum(["active", "paused", "completed", "archived"])
            .optional()
            .describe("Filter to a single status. Omit to return all projects regardless of status. Typical usage: 'active' for current work; 'paused' for projects intentionally on hold pending capacity or dependency; archived projects are usually hidden from day-to-day views."),
        },
        async ({ status }) => {
          let query: FirebaseFirestore.Query = db.collection("projects");
          if (status) {
            query = query.where("status", "==", status);
          }
    
          // Pull by updated_at desc first; we re-sort in-memory to apply the
          // primary priority rank. Firestore can't do a composite sort where
          // one of the fields may be missing (pre-priority projects) — doing it
          // in-memory is cheap at project-list cardinality (~tens of docs).
          const snapshot = await query.orderBy("updated_at", "desc").get();
          const projects = await Promise.all(
            snapshot.docs.map(async (doc) => {
              const data = doc.data();
              const tasksSnap = await db
                .collection("tasks")
                .where("project_id", "==", doc.id)
                .get();
    
              const taskCounts: Record<string, number> = {};
              tasksSnap.docs.forEach((t) => {
                const s = t.data().status as string;
                taskCounts[s] = (taskCounts[s] || 0) + 1;
              });
    
              return {
                id: doc.id,
                ...data,
                // Backfill priority for backward compat — existing docs without
                // the field are treated as "medium" in the response too.
                priority: (data.priority as Priority | undefined) ?? "medium",
                created_at: data.created_at?.toDate?.()?.toISOString() ?? null,
                updated_at: data.updated_at?.toDate?.()?.toISOString() ?? null,
                task_counts: taskCounts,
                total_tasks: tasksSnap.size,
              };
            })
          );
    
          // Primary sort: priority desc (critical → low). Tiebreaker: updated_at desc.
          // updated_at is already an ISO string here; lexical compare works because
          // ISO 8601 is sortable as a string.
          projects.sort((a, b) => {
            const pa = PRIORITY_RANK[a.priority] ?? PRIORITY_RANK.medium;
            const pb = PRIORITY_RANK[b.priority] ?? PRIORITY_RANK.medium;
            if (pa !== pb) return pb - pa;
            const ua = a.updated_at ?? "";
            const ub = b.updated_at ?? "";
            if (ua < ub) return 1;
            if (ua > ub) return -1;
            return 0;
          });
    
          return {
            content: [
              {
                type: "text" as const,
                text: JSON.stringify(projects, null, 2),
              },
            ],
          };
        }
      );
  • Input schema for board_get_projects: an optional 'status' enum parameter (active/paused/completed/archived) to filter projects. No output schema defined inline — returns raw JSON text.
    server.tool(
      "board_get_projects",
      "List all projects with per-status task counts. Call this at session start to discover available projects before creating tasks or sessions — the returned IDs are required inputs to board_create_session, board_create_task, and most other tools. Results are sorted by priority descending (critical → low), then updated_at descending as tiebreaker. Projects without an explicit priority are treated as 'medium' for sort purposes (backward compat). Each entry includes: id, name, description, status, priority, metadata, ISO-formatted created_at/updated_at, task_counts (e.g., {todo: 3, in_progress: 1, done: 12}), and total_tasks. Use this over board_get_tasks when you don't yet know which project to target.",
      {
        status: z
          .enum(["active", "paused", "completed", "archived"])
          .optional()
          .describe("Filter to a single status. Omit to return all projects regardless of status. Typical usage: 'active' for current work; 'paused' for projects intentionally on hold pending capacity or dependency; archived projects are usually hidden from day-to-day views."),
      },
  • Registration of the 'board_get_projects' tool via server.tool() call inside registerProjectTools(). The function registerProjectTools is exported and invoked from src/index.ts line 28.
    export function registerProjectTools(server: McpServer, db: Firestore) {
      server.tool(
        "board_get_projects",
  • PRIORITY_RANK constant used for sorting projects by priority (critical=4, high=3, medium=2, low=1). Used in the board_get_projects handler to sort results.
    // Portfolio-level priority rank for sorting. Higher = more important.
    // Projects without a priority field are treated as "medium" for backward compat.
    const PRIORITY_RANK: Record<string, number> = {
      critical: 4,
      high: 3,
      medium: 2,
      low: 1,
    };
Behavior5/5

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

With no annotations, the description fully discloses sorting order, default priority handling, and the exact output fields including task_counts. This provides comprehensive behavioral context for a read-only list tool.

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 front-loaded with the main action and context, every sentence adds value, and there is no redundant or extraneous information. It efficiently conveys all necessary details.

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

Completeness5/5

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

Given the tool's low complexity (one optional parameter) and no output schema, the description adequately explains the output structure, sorting, and usage context, making it complete for an AI agent to select and invoke correctly.

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?

The input schema covers 100% of parameters with a detailed description for the 'status' parameter, including usage notes. The tool description does not add additional parameter semantics beyond what the schema provides, so 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 tool's purpose: 'List all projects with per-status task counts.' It also explains the context of use (session start) and distinguishes from sibling board_get_tasks.

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

Usage Guidelines5/5

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

Explicitly guides the agent to call this at session start before creating tasks, and notes that returned IDs are required for other tools. Directly recommends using this over board_get_tasks when target project is unknown.

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/HuntsDesk/ve-vibe-board'

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