Skip to main content
Glama

basecamp_create_message

Create messages in Basecamp message boards to share updates, announcements, or discussions within projects. Specify subject, content, and board location for organized team communication.

Instructions

Create a new message in a Basecamp message board.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_idYesBasecamp resource identifier
message_board_idYes
subjectYesMessage subject/title
contentNoHTML message content. To mention people: <bc-attachment sgid="{ person.attachable_sgid }"></bc-attachment>
message_type_idNoOptional message type/category ID
statusNoMessage statusactive

Implementation Reference

  • The asynchronous handler function that executes the basecamp_create_message tool. It initializes the Basecamp client, calls the create method on messages with the provided parameters, handles the response, and returns success or error content.
    async (params) => { try { const client = await initializeBasecampClient(); const response = await client.messages.create({ params: { bucketId: params.bucket_id, messageBoardId: params.message_board_id, }, body: { subject: params.subject, content: params.content, category_id: params.message_type_id, status: params.status, }, }); if (response.status !== 201 || !response.body) { throw new Error(`Failed to create message`); } return { content: [ { type: "text", text: `Message created successfully!\n\nID: ${response.body.id}\nSubject: ${response.body.title}\nURL: ${response.body.app_url}`, }, ], }; } catch (error) { return { content: [{ type: "text", text: handleBasecampError(error) }], }; } },
  • Input schema for the basecamp_create_message tool, defining parameters like bucket_id, message_board_id, subject, content, message_type_id, and status using Zod validation.
    inputSchema: { bucket_id: BasecampIdSchema, message_board_id: BasecampIdSchema, subject: z.string().min(1).max(500).describe("Message subject/title"), content: z .string() .optional() .describe( `HTML message content. To mention people: <bc-attachment sgid="{ person.attachable_sgid }"></bc-attachment>`, ), message_type_id: BasecampIdSchema.optional().describe( "Optional message type/category ID", ), status: z .enum(["active", "draft"]) .default("active") .describe("Message status"), },
  • Registration of the basecamp_create_message tool in the registerMessageTools function using server.registerTool, specifying the tool name, input schema, annotations, and handler function.
    // basecamp_create_message server.registerTool( "basecamp_create_message", { title: "Create Basecamp Message", description: `Create a new message in a Basecamp message board.`, inputSchema: { bucket_id: BasecampIdSchema, message_board_id: BasecampIdSchema, subject: z.string().min(1).max(500).describe("Message subject/title"), content: z .string() .optional() .describe( `HTML message content. To mention people: <bc-attachment sgid="{ person.attachable_sgid }"></bc-attachment>`, ), message_type_id: BasecampIdSchema.optional().describe( "Optional message type/category ID", ), status: z .enum(["active", "draft"]) .default("active") .describe("Message status"), }, annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true, }, }, async (params) => { try { const client = await initializeBasecampClient(); const response = await client.messages.create({ params: { bucketId: params.bucket_id, messageBoardId: params.message_board_id, }, body: { subject: params.subject, content: params.content, category_id: params.message_type_id, status: params.status, }, }); if (response.status !== 201 || !response.body) { throw new Error(`Failed to create message`); } return { content: [ { type: "text", text: `Message created successfully!\n\nID: ${response.body.id}\nSubject: ${response.body.title}\nURL: ${response.body.app_url}`, }, ], }; } catch (error) { return { content: [{ type: "text", text: handleBasecampError(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/stefanoverna/basecamp-mcp'

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