Skip to main content
Glama
wowjinxy
by wowjinxy

send_message

Send messages to Discord text channels or threads using this tool, enabling communication within Discord servers through direct message delivery.

Instructions

Send a message to a Discord text channel or thread.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channel_idYes
messageYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function that implements the send_message tool. It fetches the Discord channel by ID, sends the provided content as a message, and returns a confirmation with the channel name and message ID.
    async def handle_send_message(discord_client, arguments: Dict[str, Any]) -> List[TextContent]:
        """Send a message to a channel"""
        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 to #{channel.name}. Message ID: {message.id}"
        )]
  • The tool schema definition in the list_tools() function, specifying the input parameters channel_id (string) and content (string) as required for the send_message 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"]
        }
    ),
  • The registration and dispatching logic in the call_tool() function. It checks if the tool name is in core_tool_names (which includes 'send_message') and dynamically calls CoreToolHandlers.handle_send_message.
    core_tool_names = [
        "get_server_info", "list_servers", "get_channels", "list_members",
        "get_user_info", "send_message", "read_messages", "add_reaction",
        "add_multiple_reactions", "remove_reaction", "moderate_message",
        "create_text_channel", "delete_channel", "add_role", "remove_role"
    ]
    
    if name in core_tool_names:
        handler_method = f"handle_{name}"
        if hasattr(CoreToolHandlers, handler_method):
            return await getattr(CoreToolHandlers, handler_method)(discord_client, arguments)
  • Import of the CoreToolHandlers class, which contains the send_message handler, enabling its use in the dispatch logic.
    from .core_tool_handlers import CoreToolHandlers
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 action but doesn't cover critical aspects like required permissions, rate limits, message formatting options (e.g., embeds), error conditions, or what the output contains. For a mutation tool with zero annotation coverage, this is inadequate.

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, clear sentence with no wasted words. It's front-loaded with the core action and target, making it highly efficient and easy to parse. Every word earns its place by conveying essential information.

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 mutation with 2 parameters), no annotations, and an output schema (which reduces need to describe returns), the description is minimally adequate. It states what the tool does but lacks details on behavior, parameters, and usage context, leaving gaps that could hinder effective tool selection and invocation.

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

Parameters2/5

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

Schema description coverage is 0%, so the description must compensate but fails to do so. It doesn't explain what 'channel_id' represents (e.g., Discord snowflake ID), acceptable formats (string vs. integer), or where to obtain it. It also doesn't clarify 'message' constraints (e.g., length limits, markdown support). With 2 undocumented parameters, this adds minimal value beyond the schema.

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 message') and target ('to a Discord text channel or thread'), which is specific and unambiguous. However, it doesn't differentiate from potential sibling tools like 'read_messages' or 'moderate_message' beyond the obvious verb difference, so it's not a perfect 5.

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 alternatives. It doesn't mention prerequisites (e.g., needing proper permissions), exclusions (e.g., not for voice channels), or related tools (e.g., 'bulk_delete_messages' for cleanup). This leaves the agent with minimal context for decision-making.

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

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