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
| Name | Required | Description | Default |
|---|---|---|---|
| card_table_id | Yes | The card table ID | |
| project_id | Yes | The project ID |
Implementation Reference
- src/index.ts:621-633 (handler)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) }] }; }
- src/index.ts:189-199 (schema)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'], }, },
- src/lib/basecamp-client.ts:144-147 (helper)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 || []; }
- src/lib/basecamp-client.ts:131-141 (helper)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; } }