Skip to main content
Glama

timeout_member

Manage Discord member timeouts by applying or clearing communication restrictions with specified duration and reason for moderation purposes.

Instructions

Apply or clear a communication timeout for a member.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes
server_idNo
duration_minutesNo
reasonNo

Implementation Reference

  • The handler function that executes the timeout_member tool. It fetches the guild and member, applies a timeout for the specified duration, and returns a confirmation message.
    async def handle_timeout_member(discord_client, arguments: Dict[str, Any]) -> List[TextContent]: """Timeout a member""" guild = await discord_client.fetch_guild(int(arguments["server_id"])) member = await guild.fetch_member(int(arguments["user_id"])) duration = timedelta(minutes=arguments["duration_minutes"]) member_name = member.display_name await member.timeout(duration, reason=arguments.get("reason", "Timed out via MCP")) return [TextContent( type="text", text=f"Timed out member {member_name} for {arguments['duration_minutes']} minutes\nReason: {arguments.get('reason', 'Timed out via MCP')}" )]
  • Registers the timeout_member tool with the MCP server, including its name, description, and input schema definition.
    Tool( name="timeout_member", description="Temporarily timeout a member", inputSchema={ "type": "object", "properties": { "server_id": {"type": "string", "description": "Server ID"}, "user_id": {"type": "string", "description": "User ID to timeout"}, "duration_minutes": {"type": "number", "description": "Timeout duration in minutes"}, "reason": {"type": "string", "description": "Reason for timeout"} }, "required": ["server_id", "user_id", "duration_minutes"] } ),
  • Defines the input schema for the timeout_member tool, specifying parameters and required fields.
    inputSchema={ "type": "object", "properties": { "server_id": {"type": "string", "description": "Server ID"}, "user_id": {"type": "string", "description": "User ID to timeout"}, "duration_minutes": {"type": "number", "description": "Timeout duration in minutes"}, "reason": {"type": "string", "description": "Reason for timeout"} }, "required": ["server_id", "user_id", "duration_minutes"] }
  • Dispatch logic in the call_tool function that routes 'timeout_member' calls (as part of advanced_tool_names list) to the corresponding handler method in AdvancedToolHandlers.
    if name in advanced_tool_names: handler_method = f"handle_{name}" if hasattr(AdvancedToolHandlers, handler_method): return await getattr(AdvancedToolHandlers, handler_method)(discord_client, arguments)

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