Skip to main content
Glama

List Basecamp projects (rich)

list_projects

Retrieve and display Basecamp projects with details like status, purpose, and dock tools. Supports pagination and JSON output for project management.

Instructions

Returns id, name, status, timestamps, purpose, clients_enabled, bookmarked, and enabled dock tools. Supports pagination and JSON output.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNo
pageNo
include_archivedNo
include_dockNo
dock_detailNo
formatNo

Implementation Reference

  • The async handler function for the 'list_projects' tool. It fetches projects from the Basecamp API using bcRequestWithHeaders, filters by archived status and limit, processes dock tools, and returns either a formatted table or JSON output with pagination info.
      async (args) => {
        const {
          limit,
          page,
          include_archived,
          include_dock,
          dock_detail,
          format,
        } = args;
        const wantDock = include_dock ?? true;
        const fmt = format ?? "table";
    
        const { data, headers } = await bcRequestWithHeaders<any[]>(
          "GET",
          "/projects.json",
          undefined,
          page ? { page } : undefined
        );
    
        let projects = Array.isArray(data) ? data : [];
        if (!include_archived)
          projects = projects.filter((p) => p.status === "active");
        if (limit) projects = projects.slice(0, limit);
    
        const rows = projects.map((p) => {
          const item: any = {
            id: p.id,
            name: p.name,
            status: p.status,
            created_at: p.created_at,
            updated_at: p.updated_at,
            description: p.description ?? "",
            purpose: p.purpose ?? "",
            clients_enabled: Boolean(p.clients_enabled),
            bookmarked: Boolean(p.bookmarked),
          };
          if (wantDock && Array.isArray(p.dock)) {
            item.dock_tools = p.dock
              .filter((d: any) => d?.enabled)
              .map((d: any) => d.name);
            if (dock_detail) item.dock = p.dock; // raw dock objects (includes todoset URL)
          }
          return item;
        });
    
        const nextPage = parseNextPage(headers.get("Link"));
    
        if (fmt === "json") {
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(
                  {
                    page: page ?? 1,
                    nextPage,
                    count: rows.length,
                    projects: rows,
                  },
                  null,
                  2
                ),
              },
            ],
          };
        }
    
        const trunc = (s: string, n: number) =>
          s && s.length > n ? s.slice(0, n - 1) + "…" : s || "";
        const header = [
          "ID".padEnd(12),
          "STATUS".padEnd(9),
          "CLIENTS".padEnd(8),
          "BOOKMK".padEnd(6),
          "CREATED".padEnd(10),
          "UPDATED".padEnd(10),
          "NAME".padEnd(28),
          "PURPOSE".padEnd(8),
          wantDock ? "DOCK" : "",
        ]
          .filter(Boolean)
          .join("  ");
    
        const lines = [
          `Page: ${page ?? 1}${nextPage ? `  |  Next page: ${nextPage}` : ""}`,
          "",
          header,
          "-".repeat(120),
          ...rows.map((r: any) =>
            [
              String(r.id).padEnd(12),
              String(r.status ?? "").padEnd(9),
              String(r.clients_enabled).padEnd(8),
              String(r.bookmarked).padEnd(6),
              (r.created_at ?? "").slice(0, 10).padEnd(10),
              (r.updated_at ?? "").slice(0, 10).padEnd(10),
              trunc(r.name ?? "", 28).padEnd(28),
              trunc(r.purpose ?? "", 8).padEnd(8),
              wantDock ? trunc((r.dock_tools ?? []).join(","), 28) : "",
            ]
              .filter(Boolean)
              .join("  ")
          ),
        ].join("\n");
    
        return { content: [{ type: "text", text: lines }] };
      }
    );
  • Zod input schema defining optional parameters for listing projects: limit, page, include_archived, include_dock, dock_detail, and format.
    inputSchema: {
      limit: z.number().int().positive().max(200).optional(),
      page: z.number().int().positive().optional(),
      include_archived: z.boolean().optional(),
      include_dock: z.boolean().optional(),
      dock_detail: z.boolean().optional(), // NEW: include raw dock
      format: z.enum(["table", "json"]).optional(),
    },
  • Registration of the 'list_projects' tool on the MCP server, including title, description, input schema, and handler function.
    server.registerTool(
      "list_projects",
      {
        title: "List Basecamp projects (rich)",
        description:
          "Returns id, name, status, timestamps, purpose, clients_enabled, bookmarked, and enabled dock tools. Supports pagination and JSON output.",
        inputSchema: {
          limit: z.number().int().positive().max(200).optional(),
          page: z.number().int().positive().optional(),
          include_archived: z.boolean().optional(),
          include_dock: z.boolean().optional(),
          dock_detail: z.boolean().optional(), // NEW: include raw dock
          format: z.enum(["table", "json"]).optional(),
        },
      },
      async (args) => {
        const {
          limit,
          page,
          include_archived,
          include_dock,
          dock_detail,
          format,
        } = args;
        const wantDock = include_dock ?? true;
        const fmt = format ?? "table";
    
        const { data, headers } = await bcRequestWithHeaders<any[]>(
          "GET",
          "/projects.json",
          undefined,
          page ? { page } : undefined
        );
    
        let projects = Array.isArray(data) ? data : [];
        if (!include_archived)
          projects = projects.filter((p) => p.status === "active");
        if (limit) projects = projects.slice(0, limit);
    
        const rows = projects.map((p) => {
          const item: any = {
            id: p.id,
            name: p.name,
            status: p.status,
            created_at: p.created_at,
            updated_at: p.updated_at,
            description: p.description ?? "",
            purpose: p.purpose ?? "",
            clients_enabled: Boolean(p.clients_enabled),
            bookmarked: Boolean(p.bookmarked),
          };
          if (wantDock && Array.isArray(p.dock)) {
            item.dock_tools = p.dock
              .filter((d: any) => d?.enabled)
              .map((d: any) => d.name);
            if (dock_detail) item.dock = p.dock; // raw dock objects (includes todoset URL)
          }
          return item;
        });
    
        const nextPage = parseNextPage(headers.get("Link"));
    
        if (fmt === "json") {
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(
                  {
                    page: page ?? 1,
                    nextPage,
                    count: rows.length,
                    projects: rows,
                  },
                  null,
                  2
                ),
              },
            ],
          };
        }
    
        const trunc = (s: string, n: number) =>
          s && s.length > n ? s.slice(0, n - 1) + "…" : s || "";
        const header = [
          "ID".padEnd(12),
          "STATUS".padEnd(9),
          "CLIENTS".padEnd(8),
          "BOOKMK".padEnd(6),
          "CREATED".padEnd(10),
          "UPDATED".padEnd(10),
          "NAME".padEnd(28),
          "PURPOSE".padEnd(8),
          wantDock ? "DOCK" : "",
        ]
          .filter(Boolean)
          .join("  ");
    
        const lines = [
          `Page: ${page ?? 1}${nextPage ? `  |  Next page: ${nextPage}` : ""}`,
          "",
          header,
          "-".repeat(120),
          ...rows.map((r: any) =>
            [
              String(r.id).padEnd(12),
              String(r.status ?? "").padEnd(9),
              String(r.clients_enabled).padEnd(8),
              String(r.bookmarked).padEnd(6),
              (r.created_at ?? "").slice(0, 10).padEnd(10),
              (r.updated_at ?? "").slice(0, 10).padEnd(10),
              trunc(r.name ?? "", 28).padEnd(28),
              trunc(r.purpose ?? "", 8).padEnd(8),
              wantDock ? trunc((r.dock_tools ?? []).join(","), 28) : "",
            ]
              .filter(Boolean)
              .join("  ")
          ),
        ].join("\n");
    
        return { content: [{ type: "text", text: lines }] };
      }
    );
Behavior3/5

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

No annotations are provided, so the description carries full burden. It discloses that the tool 'Supports pagination and JSON output' - useful behavioral context about output format and data handling. However, it doesn't mention authentication requirements, rate limits, error conditions, or whether this is a read-only operation. For a listing tool with 6 parameters, this leaves important behavioral aspects unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately concise with two sentences that each serve clear purposes: the first specifies what data is returned, the second describes behavioral features. It's front-loaded with the core functionality. While efficient, it could be slightly more structured by separating parameter implications from output format 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?

For a listing tool with 6 parameters, 0% schema coverage, no annotations, and no output schema, the description is moderately complete. It covers the core return data and mentions pagination/output format, but leaves many parameters unexplained and doesn't provide guidance on usage context. Given the complexity, it should explain parameter purposes and when to use this versus other list tools to be fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage and 6 parameters, the description must compensate but fails to do so. It mentions 'Supports pagination' which vaguely relates to 'limit' and 'page' parameters, and 'JSON output' which relates to the 'format' enum, but doesn't explain what 'include_archived', 'include_dock', or 'dock_detail' do. The description adds minimal value beyond what the bare schema provides, insufficient for the coverage gap.

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 tool's purpose: 'Returns id, name, status, timestamps, purpose, clients_enabled, bookmarked, and enabled dock tools' - a specific verb ('Returns') with detailed resource information. It distinguishes from siblings like 'create_todo' or 'get_message' by focusing on listing projects rather than creating or retrieving specific items. However, it doesn't explicitly differentiate from other list tools like 'list_messages' or 'list_todolists' beyond the resource type.

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 provides no guidance on when to use this tool versus alternatives. It mentions 'Supports pagination and JSON output' which hints at usage context, but doesn't specify when to choose this over other list tools, what prerequisites exist, or any exclusion criteria. With sibling tools like 'list_messages' and 'list_todolists' available, the lack of comparative guidance is a significant gap.

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/craigashields/basecamp-mcp'

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