Skip to main content
Glama

timeout_member

Manage Discord member communication by applying or clearing timeout restrictions to moderate server interactions.

Instructions

Apply or clear a communication timeout for a member.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
user_idYes
server_idNo
duration_minutesNo
reasonNo

Implementation Reference

  • Implements the timeout_member tool by fetching the guild and member, calculating timeout duration, applying the timeout, and returning 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')}" )]
  • Defines the input schema and parameters for the timeout_member tool during registration.
    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"] } ),
  • Dispatches calls to timeout_member (and other advanced tools) by dynamically invoking the corresponding handler method on 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