INNER CODE UNIT · Python
list_guilds
existence-master/Sentient · src/server/mcp_hub/discord/main.py:46
async def list_guilds(ctx: Context) -> Dict:
"""
Lists the Discord servers (guilds) that the authenticated user's bot is a member of, returning their names and IDs.
"""
logger.info("Executing tool: list_guilds")
return await _execute_tool(ctx, "list_guilds")
@mcp.tool
async def list_channels(ctx: Context, guild_id: str) -> Dict:
"""
Retrieves a list of all text and voice channels within a specified Discord server (guild), returning their names and IDs.
"""
logger.info(f"Executing tool: list_channels with guild_id='{guild_id}'")
return await _execute_tool(ctx, "list_channels", guild_id)
@mcp.tool
async def send_channel_message(ctx: Context, channel_id: str, content: str) -> Dict:
"""