Skip to main content
Glama
ice3x2

Google Chat Webhook MCP Server

by ice3x2

send_google_chat_text

Send text messages to Google Chat via webhooks with automatic Markdown formatting conversion to rich cards, including support for headers, lists, code blocks, tables, and images.

Instructions

Send a text message to configured Google Chat webhook

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes

Implementation Reference

  • Inline handler function for 'send_google_chat_text' tool. Calls sendTextMessage and formats MCP response.
    const sendTextHandler = (async ({ text }: { text: string }) => { try { await sendTextMessage({ text }, webhook); const out = { success: true }; return { content: [{ type: 'text', text: JSON.stringify(out) }], structuredContent: out }; } catch (err: unknown) { const e = err as Error; return { content: [{ type: 'text', text: `Error: ${e.message}` }], isError: true }; } }) as any;
  • src/server.ts:88-97 (registration)
    Registers the 'send_google_chat_text' tool with MCP server, including title, description, input/output schemas, and handler reference.
    server.registerTool( 'send_google_chat_text', { title: 'Send Google Chat Text', description: 'Send a text message to configured Google Chat webhook', inputSchema: ( { text: z.string() } as unknown ) as any, outputSchema: ( { success: z.boolean() } as unknown ) as any }, sendTextHandler );
  • Zod-based input schema ({ text: string }) and output schema ({ success: boolean }) for the tool.
    inputSchema: ( { text: z.string() } as unknown ) as any, outputSchema: ( { success: z.boolean() } as unknown ) as any
  • Core helper function that sends the text message via HTTP POST to Google Chat webhook using axios.
    export async function sendTextMessage(params: SendTextParams, webhookUrl?: string) { if (!params || typeof params.text !== 'string') { throw new Error('Invalid params for sendTextMessage'); } if (!webhookUrl) { console.log('[sendTextMessage] no webhook configured — skipping HTTP send. payload:', { text: params.text }); return { mock: true }; } const payload = { text: params.text }; const res = await axios.post(webhookUrl, payload, { timeout: 5000 }); return res.data; }
  • TypeScript type definition for input parameters to sendTextMessage.
    export type SendTextParams = { text: string };

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/ice3x2/google-chat-webhook-mcp'

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