basecamp_list_comments
Retrieve all comments from Basecamp resources including messages, todos, and cards to track discussions and feedback across project items.
Instructions
List comments on any Basecamp resource (message, todo, card, etc.). Works universally on all recording types.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bucket_id | Yes | Basecamp resource identifier | |
| recording_id | Yes | ID of the resource (message, todo, card, etc.) |
Implementation Reference
- src/tools/comments.ts:40-77 (handler)The handler function for basecamp_list_comments tool. Fetches comments using the Basecamp client, maps and serializes them (including creator via serializePerson), and returns as formatted JSON text content.async (params) => { try { const client = await initializeBasecampClient(); const comments = await asyncPagedToArray({ fetchPage: client.comments.list, request: { params: { bucketId: params.bucket_id, recordingId: params.recording_id, }, query: {}, }, }); return { content: [ { type: "text", text: JSON.stringify( comments.map((c) => ({ id: c.id, creator: serializePerson(c.creator), content: c.content, created_at: c.created_at, })), null, 2, ), }, ], }; } catch (error) { return { content: [{ type: "text", text: handleBasecampError(error) }], }; } },
- src/tools/comments.ts:21-78 (registration)Registers the basecamp_list_comments tool on the MCP server with input schema, description, annotations, and handler function.server.registerTool( "basecamp_list_comments", { title: "List Basecamp Comments", description: "List comments on any Basecamp resource (message, todo, card, etc.). Works universally on all recording types.", inputSchema: { bucket_id: BasecampIdSchema, recording_id: BasecampIdSchema.describe( "ID of the resource (message, todo, card, etc.)", ), }, annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, }, async (params) => { try { const client = await initializeBasecampClient(); const comments = await asyncPagedToArray({ fetchPage: client.comments.list, request: { params: { bucketId: params.bucket_id, recordingId: params.recording_id, }, query: {}, }, }); return { content: [ { type: "text", text: JSON.stringify( comments.map((c) => ({ id: c.id, creator: serializePerson(c.creator), content: c.content, created_at: c.created_at, })), null, 2, ), }, ], }; } catch (error) { return { content: [{ type: "text", text: handleBasecampError(error) }], }; } }, );
- src/schemas/common.ts:10-12 (schema)Zod schema for Basecamp resource IDs (number), used in the inputSchema for bucket_id and recording_id parameters.export const BasecampIdSchema = z .number() .describe("Basecamp resource identifier");
- src/index.ts:64-64 (registration)Calls registerCommentTools to register all comment-related tools, including basecamp_list_comments, on the main MCP server instance.registerCommentTools(server);