Skip to main content
Glama
jhliberty

Basecamp MCP Server

by jhliberty

get_card_table

Retrieve card table details for a specific project by providing the project ID. Integrates with Basecamp 3 to manage project-related data efficiently.

Instructions

Get the card table details for a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe project ID

Implementation Reference

  • Main handler for the 'get_card_table' MCP tool. Fetches the card table for a project using BasecampClient methods and returns JSON-formatted details.
    case 'get_card_table': {
      const cardTable = await client.getCardTable(typedArgs.project_id);
      const cardTableDetails = await client.getCardTableDetails(typedArgs.project_id, cardTable.id);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({
            status: 'success',
            card_table: cardTableDetails
          }, null, 2)
        }]
      };
    }
  • src/index.ts:178-187 (registration)
    Tool registration in the listTools handler, including name, description, and input schema.
      name: 'get_card_table',
      description: 'Get the card table details for a project',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: { type: 'string', description: 'The project ID' },
        },
        required: ['project_id'],
      },
    },
  • Input schema definition for the get_card_table tool.
    inputSchema: {
      type: 'object',
      properties: {
        project_id: { type: 'string', description: 'The project ID' },
      },
      required: ['project_id'],
    },
  • Helper method to retrieve the first card table for a project.
    async getCardTable(projectId: string): Promise<any> {
      const cardTables = await this.getCardTables(projectId);
      if (!cardTables.length) {
        throw new Error(`No card tables found for project: ${projectId}`);
      }
      return cardTables[0];
    }
  • Helper method to fetch detailed card table information via API.
    async getCardTableDetails(projectId: string, cardTableId: string): Promise<CardTable> {
      try {
        const response = await this.client.get(`/buckets/${projectId}/card_tables/${cardTableId}.json`);
        return response.data;
      } catch (error: any) {
        if (error.response?.status === 204) {
          return { id: cardTableId, title: 'Card Table', lists: [], status: 'empty' };
        }
        throw error;
      }
    }

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

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