Skip to main content
Glama

basecamp_get_message

Retrieve a specific message from a Basecamp message board by providing the project ID and message ID to access project communications.

Instructions

Retrieve a single message from a Basecamp message board.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_idYesProject/bucket ID containing the message
message_idYesMessage ID to retrieve

Implementation Reference

  • Handler function that executes the basecamp_get_message tool logic: initializes Basecamp client, retrieves message by bucket_id and message_id, serializes response data (id, subject, content, author, dates, url) as JSON text content, handles API errors.
      async (params) => {
        try {
          const client = await initializeBasecampClient();
          const response = await client.messages.get({
            params: { bucketId: params.bucket_id, messageId: params.message_id },
          });
    
          if (response.status !== 200 || !response.body) {
            throw new Error(`Failed to fetch message: ${response.status}`);
          }
    
          const msg = response.body;
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(
                  {
                    id: msg.id,
                    subject: msg.title,
                    content: msg.content || "",
                    author: serializePerson(msg.creator),
                    created_at: msg.created_at,
                    updated_at: msg.updated_at,
                    url: msg.app_url,
                  },
                  null,
                  2,
                ),
              },
            ],
          };
        } catch (error) {
          return {
            content: [{ type: "text", text: handleBasecampError(error) }],
          };
        }
      },
    );
  • Input schema and metadata for basecamp_get_message tool: requires bucket_id and message_id (using shared BasecampIdSchema), read-only idempotent tool.
    {
      title: "Get Basecamp Message",
      description: `Retrieve a single message from a Basecamp message board.`,
      inputSchema: {
        bucket_id: BasecampIdSchema.describe(
          "Project/bucket ID containing the message",
        ),
        message_id: BasecampIdSchema.describe("Message ID to retrieve"),
      },
      annotations: {
        readOnlyHint: true,
        destructiveHint: false,
        idempotentHint: true,
        openWorldHint: true,
      },
    },
  • Direct registration of the basecamp_get_message tool within registerMessageTools function.
    server.registerTool(
      "basecamp_get_message",
      {
        title: "Get Basecamp Message",
        description: `Retrieve a single message from a Basecamp message board.`,
        inputSchema: {
          bucket_id: BasecampIdSchema.describe(
            "Project/bucket ID containing the message",
          ),
          message_id: BasecampIdSchema.describe("Message ID to retrieve"),
        },
        annotations: {
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
      },
      async (params) => {
        try {
          const client = await initializeBasecampClient();
          const response = await client.messages.get({
            params: { bucketId: params.bucket_id, messageId: params.message_id },
          });
    
          if (response.status !== 200 || !response.body) {
            throw new Error(`Failed to fetch message: ${response.status}`);
          }
    
          const msg = response.body;
    
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(
                  {
                    id: msg.id,
                    subject: msg.title,
                    content: msg.content || "",
                    author: serializePerson(msg.creator),
                    created_at: msg.created_at,
                    updated_at: msg.updated_at,
                    url: msg.app_url,
                  },
                  null,
                  2,
                ),
              },
            ],
          };
        } catch (error) {
          return {
            content: [{ type: "text", text: handleBasecampError(error) }],
          };
        }
      },
    );
  • src/index.ts:62-62 (registration)
    Top-level registration call in main server setup that invokes registerMessageTools to register message tools including basecamp_get_message.
    registerMessageTools(server);
  • Shared Zod schema for Basecamp IDs, used in inputSchema for bucket_id and message_id.
    export const BasecampIdSchema = z
      .number()
      .describe("Basecamp resource identifier");

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