Skip to main content
Glama
jhliberty

Basecamp MCP Server

by jhliberty

get_columns

Retrieve all columns from a specified card table within a project using Basecamp 3 integration. Requires project ID and card table ID for targeted data access.

Instructions

Get all columns in a card table

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
card_table_idYesThe card table ID
project_idYesThe project ID

Implementation Reference

  • MCP tool handler for 'get_columns' that invokes the Basecamp client method and formats the response as MCP content.
    case 'get_columns': {
      const columns = await client.getColumns(typedArgs.project_id, typedArgs.card_table_id);
      return {
        content: [{
          type: 'text',
          text: JSON.stringify({
            status: 'success',
            columns,
            count: columns.length
          }, null, 2)
        }]
      };
    }
  • Input schema definition for the 'get_columns' tool, specifying required project_id and card_table_id parameters.
      name: 'get_columns',
      description: 'Get all columns in a card table',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: { type: 'string', description: 'The project ID' },
          card_table_id: { type: 'string', description: 'The card table ID' },
        },
        required: ['project_id', 'card_table_id'],
      },
    },
  • Core implementation of getColumns in BasecampClient, fetching card table details and extracting the lists (columns).
    async getColumns(projectId: string, cardTableId: string): Promise<Column[]> {
      const cardTableDetails = await this.getCardTableDetails(projectId, cardTableId);
      return cardTableDetails.lists || [];
    }
  • Supporting method getCardTableDetails used by getColumns to fetch card table data 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