feat(discord): add discord_server tool with 15 actions#11641
Open
suryanshsrivastava wants to merge 1 commit into
Open
feat(discord): add discord_server tool with 15 actions#11641suryanshsrivastava wants to merge 1 commit into
suryanshsrivastava wants to merge 1 commit into
Conversation
Restores teknium's discord_server tool (originally from 2f323ec, lost during rebase) and adds a new fetch_message action that accepts Discord message URLs for easy single-message retrieval. Actions: list_guilds, server_info, list_channels, channel_info, list_roles, member_info, search_members, fetch_messages, fetch_message, list_pins, pin_message, unpin_message, create_thread, add_role, remove_role. fetch_message accepts either channel_id+message_id or a full Discord URL (https://discord.com/channels/GUILD/CHANNEL/MESSAGE). Closes NousResearch#2105 Partially addresses NousResearch#1559
This was referenced Apr 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Restores teknium's
discord_servertool (originally from commit2f323ec4, lost during rebase) and adds a newfetch_messageaction that accepts Discord message URLs for easy single-message retrieval.What's included
New file:
tools/discord_tool.py— 15 actions covering Discord server introspection and basic moderation:list_guildsserver_infolist_channelschannel_infolist_rolesmember_infosearch_membersfetch_messagesfetch_messagelist_pinspin_messageunpin_messagecreate_threadadd_roleremove_roleGated on
DISCORD_BOT_TOKEN— the tool auto-registers when the env var is set, zero cost for non-Discord platforms.Added to
hermes-discordtoolset intoolsets.py.New:
fetch_messageThe original tool had
fetch_messagesfor channel history but no way to look up a single message.fetch_messageaccepts:channel_id=123, message_id=456message_url=https://discord.com/channels/GUILD/CHANNEL/MESSAGEThis is particularly useful for bot-to-bot communication where one bot posts a message and another needs to read it.
Related PRs & Issues
This PR builds on and complements several existing efforts:
feat: support discord bot-to-bot interaction— ourfetch_messageaction enables bot-to-bot message reading, which is a core requirement for that feature.[codex] Add Discord read tools— similar goal of exposing Discord read capabilities as tools. This PR provides a broader set of 15 actions (including read operations) with the addedfetch_messageURL-based lookup.feat(discord): add channel history tool— ourfetch_messagesaction covers channel history access. This PR packages it alongside the full introspection toolset.feat: /history slash command for Discord— related to making message history accessible. This PR provides the underlying tool that such a slash command could call.RFC(discord): richer Discord-native UX prototype— broader Discord UX improvements this tool can feed into.Closes
Tests
48 unit tests in
tests/tools/test_discord_tool.pycovering all 15 actions, URL parsing, error handling, and toolset inclusion. Registry snapshot test updated.All tests pass:
pytest tests/tools/test_discord_tool.py tests/tools/test_registry.py -v→ 79 passed.Attribution
Original implementation by @teknium1 (commit
2f323ec4, Apr 3, 2026). Restored with thefetch_messageaddition.