Skip to main content
Glama

send_message

Send messages to a specific Discord channel using a channel ID and content. Integrate Discord communication into MCP client workflows.

Instructions

Send a message to a specific channel

Input Schema

NameRequiredDescriptionDefault
channel_idYesDiscord channel ID
contentYesMessage content

Input Schema (JSON Schema)

{ "properties": { "channel_id": { "description": "Discord channel ID", "type": "string" }, "content": { "description": "Message content", "type": "string" } }, "required": [ "channel_id", "content" ], "type": "object" }

Implementation Reference

  • The handler logic for the 'send_message' tool within the call_tool function. It fetches the Discord channel by ID, sends the message with the given content, and returns a confirmation with the new message ID.
    if name == "send_message": channel = await discord_client.fetch_channel(int(arguments["channel_id"])) message = await channel.send(arguments["content"]) return [TextContent( type="text", text=f"Message sent successfully. Message ID: {message.id}" )]
  • Registration of the 'send_message' tool in the list_tools() function, defining its name, description, and input schema requiring 'channel_id' and 'content'.
    Tool( name="send_message", description="Send a message to a specific channel", inputSchema={ "type": "object", "properties": { "channel_id": { "type": "string", "description": "Discord channel ID" }, "content": { "type": "string", "description": "Message content" } }, "required": ["channel_id", "content"] } ),

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/hanweg/mcp-discord'

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