Skip to main content
Glama

Send chat message

wopee_send_chat_message

Post status updates or informational messages to the project chat room. Messages appear as system messages to keep the team informed.

Instructions

Send a message to the current project's chat room. Use this to post status updates (e.g., 'Test run started...', 'Analysis complete') or informational messages to the chat. The message will appear as a SYSTEM message in the chat room. Requires WOPEE_PROJECT_UUID to be configured.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesThe message content to send to the chat room
contentTypeNoThe type of message: TEXT for regular messages, STATUS_UPDATE for status notificationsTEXT

Implementation Reference

  • The main tool definition and handler function for wopee_send_chat_message. The handler fetches the chat room for the configured project UUID, then sends the chat message with the provided content, contentType, sourcePlatform='CMD', and authorType='SYSTEM'. Returns success/failure messages.
    export const wopeeSendChatMessage = {
      name: ToolName.WOPEE_SEND_CHAT_MESSAGE,
      config: {
        title: "Send chat message",
        description:
          "Send a message to the current project's chat room. Use this to post status updates (e.g., 'Test run started...', 'Analysis complete') or informational messages to the chat. The message will appear as a SYSTEM message in the chat room. Requires WOPEE_PROJECT_UUID to be configured.",
        inputSchema: InputSchema.shape,
      },
      handler: async (input: Input) => {
        try {
          const { WOPEE_PROJECT_UUID } = getConfig();
    
          if (!WOPEE_PROJECT_UUID)
            return {
              content: [
                { type: "text" as const, text: "WOPEE_PROJECT_UUID is not set" },
              ],
            };
    
          // First fetch the chat room for this project
          const roomResult = await requestClient<{
            fetchChatRoom: { uuid: string } | null;
          }>(FetchChatRoom, {
            projectUuid: WOPEE_PROJECT_UUID,
          });
    
          if (!roomResult?.fetchChatRoom)
            return {
              content: [
                {
                  type: "text" as const,
                  text: "No chat room found for this project",
                },
              ],
            };
    
          const result = await requestClient<{
            sendChatMessage: { uuid: string; content: string; createdAt: string } | null;
          }>(SendChatMessage, {
            input: {
              roomUuid: roomResult.fetchChatRoom.uuid,
              content: input.content,
              contentType: input.contentType,
              sourcePlatform: "CMD",
              authorType: "SYSTEM",
            },
          });
    
          if (!result?.sendChatMessage)
            return {
              content: [
                {
                  type: "text" as const,
                  text: "Failed to send message to chat room",
                },
              ],
            };
    
          return {
            content: [
              {
                type: "text" as const,
                text: `Message sent successfully to chat room.`,
              },
            ],
          };
        } catch (error) {
          return _parseError(error);
        }
      },
    };
  • Input validation schema using Zod: expects 'content' (string) and optional 'contentType' (enum: STATUS_UPDATE or TEXT, defaults to TEXT).
    const InputSchema = z.object({
      content: z.string().describe("The message content to send to the chat room"),
      contentType: z
        .enum(["STATUS_UPDATE", "TEXT"])
        .default("TEXT")
        .describe(
          "The type of message: TEXT for regular messages, STATUS_UPDATE for status notifications",
        ),
    });
  • Import and registration of the wopeeSendChatMessage tool in the TOOLS array (line 25).
    import { wopeeSendChatMessage } from "./wopee_send_chat_message/index.js";
    import { wopeeReadChatHistory } from "./wopee_read_chat_history/index.js";
    import { wopeeCreateGithubIssue } from "./wopee_create_github_issue/index.js";
    
    export const TOOLS = [
      wopeeCreateBlankSuite,
      wopeeFetchAnalysisSuites,
      wopeeFetchExecutedTestCases,
    
      wopeeDispatchAnalysis,
      wopeeDispatchAgent,
    
      wopeeFetchArtifact,
      wopeeUpdateArtifact,
      wopeeGenerateArtifact,
    
      wopeeSendChatMessage,
      wopeeReadChatHistory,
      wopeeCreateGithubIssue,
    ];
  • GraphQL queries used by the handler: SendChatMessage mutation (lines 233-243) sends a chat message with input fields, and FetchChatRoom query (lines 259-267) fetches the chat room UUID for a project.
    // Chat tools
    export const SendChatMessage = `
      mutation SendChatMessage($input: SendChatMessageInput!) {
        sendChatMessage(input: $input) {
          uuid
          content
          contentType
          authorType
          createdAt
        }
      }
    `;
    
    export const FetchChatMessages = `
      query FetchChatMessages($roomUuid: ID!, $limit: Int) {
        fetchChatMessages(roomUuid: $roomUuid, limit: $limit) {
          uuid
          authorType
          authorName
          content
          contentType
          sourcePlatform
          createdAt
        }
      }
    `;
    
    export const FetchChatRoom = `
      query FetchChatRoom($projectUuid: ID!) {
        fetchChatRoom(projectUuid: $projectUuid) {
          uuid
          contextSummary
          createdAt
        }
      }
    `;
    
    export const CreateGitHubIssue = `
      mutation CreateGitHubIssue($projectUuid: ID!, $title: String!, $body: String!, $labels: [String!]) {
        createGitHubIssue(projectUuid: $projectUuid, title: $title, body: $body, labels: $labels) {
          url
          number
          title
        }
      }
    `;
  • Enum definition mapping ToolName.WOPEE_SEND_CHAT_MESSAGE to the string 'wopee_send_chat_message'.
    WOPEE_SEND_CHAT_MESSAGE = "wopee_send_chat_message",
Behavior3/5

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

Discloses message appears as 'SYSTEM message' and requires configuration, but does not address idempotency, rate limits, or side effects like notifications.

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?

Two sentences, front-loaded with action verb, no redundant phrases. Every sentence earns its place.

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

Completeness5/5

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

Given no output schema and simple parameters, description adequately covers purpose, usage, and prerequisites for effective agent invocation.

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?

Schema coverage is 100%, so baseline is 3. Description adds minimal value beyond schema, only hinting 'STATUS_UPDATE' for status notifications.

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

Purpose5/5

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

Clearly states 'send a message to the current project's chat room' with verb 'send' and resource 'chat message'. Distinguishes from sibling 'wopee_read_chat_history' by implying write operation.

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

Usage Guidelines4/5

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

Specifies use cases: 'post status updates' or 'informational messages'. Mentions requirement 'WOPEE_PROJECT_UUID' but lacks explicit when-not-to-use or alternatives.

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/Wopee-io/wopee-mcp'

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