Skip to main content
Glama
launchnotes

LaunchNotes MCP Server

Official
by launchnotes

launchnotes_get_announcement

Retrieve complete details for a specific LaunchNotes announcement including content, categories, and metadata by providing the announcement ID.

Instructions

Retrieve complete details for a specific announcement including content, categories, and metadata.

Args:

  • announcement_id (string): The ID of the announcement

  • response_format ('json' | 'markdown'): Output format (default: 'markdown')

Returns: Complete announcement details with all fields

Use Cases:

  • "Show me announcement details for ID abc123"

  • "Get the full content of announcement xyz"

  • "What are the categories for this announcement?"

Error Handling:

  • Returns "Announcement not found" if ID doesn't exist

  • Returns "Authentication failed" if API token is invalid

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
announcement_idYesThe ID of the announcement to retrieve
response_formatNoOutput format: 'json' for structured data, 'markdown' for human-readablemarkdown

Implementation Reference

  • The main execution handler for the 'launchnotes_get_announcement' tool. Fetches announcement data via GraphQL, supports JSON or Markdown output formatting, and handles errors.
    async (params: GetAnnouncementInput) => {
      try {
        const result = await getAnnouncement(client, params.announcement_id);
        const announcement = result.announcement;
    
        if (params.response_format === RESPONSE_FORMAT.JSON) {
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(announcement, null, 2),
              },
            ],
          };
        }
    
        // Markdown format
        return {
          content: [
            {
              type: "text",
              text: formatAnnouncementMarkdown(announcement),
            },
          ],
        };
      } catch (error) {
        return {
          isError: true,
          content: [
            {
              type: "text",
              text: `Error retrieving announcement: ${error instanceof Error ? error.message : "Unknown error"}`,
            },
          ],
        };
      }
  • Input schema using Zod for validating parameters: announcement_id (required string) and response_format (optional json/markdown).
    export const GetAnnouncementSchema = z
      .object({
        announcement_id: z
          .string()
          .min(1, "Announcement ID is required")
          .describe("The ID of the announcement to retrieve"),
        response_format: responseFormatSchema,
      })
      .strict();
  • Registration of the tool with the MCP server, including metadata (title, description), input schema reference, annotations for tool behavior, and handler attachment.
      server.registerTool(
        "launchnotes_get_announcement",
        {
          title: "Get LaunchNotes Announcement",
          description: `Retrieve complete details for a specific announcement including content, categories, and metadata.
    
    Args:
      - announcement_id (string): The ID of the announcement
      - response_format ('json' | 'markdown'): Output format (default: 'markdown')
    
    Returns:
      Complete announcement details with all fields
    
    Use Cases:
      - "Show me announcement details for ID abc123"
      - "Get the full content of announcement xyz"
      - "What are the categories for this announcement?"
    
    Error Handling:
      - Returns "Announcement not found" if ID doesn't exist
      - Returns "Authentication failed" if API token is invalid`,
          inputSchema: GetAnnouncementSchema,
          annotations: {
            readOnlyHint: true,
            destructiveHint: false,
            idempotentHint: true,
            openWorldHint: true,
          },
        },
        async (params: GetAnnouncementInput) => {
          try {
            const result = await getAnnouncement(client, params.announcement_id);
            const announcement = result.announcement;
    
            if (params.response_format === RESPONSE_FORMAT.JSON) {
              return {
                content: [
                  {
                    type: "text",
                    text: JSON.stringify(announcement, null, 2),
                  },
                ],
              };
            }
    
            // Markdown format
            return {
              content: [
                {
                  type: "text",
                  text: formatAnnouncementMarkdown(announcement),
                },
              ],
            };
          } catch (error) {
            return {
              isError: true,
              content: [
                {
                  type: "text",
                  text: `Error retrieving announcement: ${error instanceof Error ? error.message : "Unknown error"}`,
                },
              ],
            };
          }
        }
      );
  • Core GraphQL helper that executes the GET_ANNOUNCEMENT_QUERY to retrieve full announcement details by ID.
    export async function getAnnouncement(
      client: GraphQLClient,
      announcementId: string
    ): Promise<{
      announcement: LaunchNotesAnnouncement;
    }> {
      return client.execute(GET_ANNOUNCEMENT_QUERY, { id: announcementId });
    }
  • GraphQL query string definition that fetches comprehensive announcement data including content, metadata, categories, analytics, and permalinks.
    export const GET_ANNOUNCEMENT_QUERY = `
      query GetAnnouncement($id: ID!) {
        announcement(id: $id) {
          id
          headline
          title
          titleWithFallback
          name
          description
          content
          contentHtml
          excerpt
          state
          slug
          publishedAt
          scheduledAt
          createdAt
          updatedAt
          author
          publicPermalink
          privatePermalink
          categories {
            id
            name
            color
          }
          emailAnalytics {
            sentCount
            openRate
            clickRate
            clickToOpenRate
          }
          viewerAnalytics {
            totalUniqueSubscribersCount
            totalUniqueAnonymousCount
            totalUniqueEmbeddedCount
          }
        }
      }
    `;

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/launchnotes/mcp'

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