Skip to main content
Glama
ice3x2

Google Chat Webhook MCP Server

by ice3x2

Send Google Chat Text

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYes

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 };
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool sends a message, implying a write/mutation operation, but lacks details on permissions, rate limits, error handling, or response format. The mention of 'configured Google Chat webhook' hints at external setup but doesn't clarify behavioral traits like authentication needs or potential side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose without unnecessary words. Every element ('Send a text message', 'to configured Google Chat webhook') directly contributes to understanding the tool's function, making it appropriately sized and well-structured for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (a write operation with 1 parameter) and the presence of an output schema (which handles return values), the description is minimally adequate. However, with no annotations and low schema coverage, it lacks details on behavioral aspects like permissions or error handling. It covers the basic 'what' but misses the 'how' and 'when', leaving gaps for the agent to infer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 1 parameter with 0% description coverage, so the schema provides no semantic context. The description adds minimal value by implying the 'text' parameter is the message content, but doesn't elaborate on format, length limits, or encoding. This partially compensates for the schema gap, but leaves key details unspecified, aligning with the baseline for moderate coverage issues.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Send a text message') and target resource ('to configured Google Chat webhook'), making the purpose immediately understandable. It distinguishes from sibling tools by specifying 'text' rather than 'cards' or 'markdown', though it doesn't explicitly contrast them. The description avoids tautology by not merely restating the name/title.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus the sibling tools (send_google_chat_cards_v2, send_google_chat_markdown). It mentions 'configured Google Chat webhook' which implies a prerequisite setup, but offers no explicit usage context, alternatives, or exclusions. This leaves the agent with minimal direction for tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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