feat: add read_channel tool for Discord channel history - #3666
Closed
aloysiusmartis wants to merge 1 commit into
Closed
feat: add read_channel tool for Discord channel history#3666aloysiusmartis wants to merge 1 commit into
aloysiusmartis wants to merge 1 commit into
Conversation
New tool: read_channel — reads message history from Discord channels and threads using the bot's existing token via REST API. Features: - Accepts channel IDs, Discord URLs, or #channel-name references - Returns formatted messages with timestamps, authors, attachments, reply context - Limit 1-50 messages per call - Gated on DISCORD_BOT_TOKEN availability (check_fn) Registration (all 4 layers): 1. tools/read_channel_tool.py — tool implementation + registry.register() 2. model_tools.py — added to _discover_tools() import list 3. toolsets.py — added to _HERMES_CORE_TOOLS + messaging toolset 4. hermes_cli/tools_config.py — added messaging to CONFIGURABLE_TOOLSETS The CONFIGURABLE_TOOLSETS addition is critical: without it, the messaging toolset (including send_message) is silently excluded by the platform tool filter in _get_platform_tools(). This means send_message was only working by accident via legacy resolution paths. Co-authored-by: Al's bot
Collaborator
Collaborator
|
superseded comment posted |
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
New tool:
read_channel— reads message history from Discord channels and threads using the bot's existing token via the Discord REST API.Features
#channel-namereferencesDISCORD_BOT_TOKENavailability viacheck_fnChanges
New file
tools/read_channel_tool.py— full tool implementation with async Discord API callsRegistration (all 4 required layers)
model_tools.py— added to_discover_tools()import listtoolsets.py— added to_HERMES_CORE_TOOLS+messagingtoolset definitionhermes_cli/tools_config.py— addedmessagingtoCONFIGURABLE_TOOLSETSBug fix: messaging toolset missing from CONFIGURABLE_TOOLSETS
The
messagingtoolset (containingsend_message) was not inCONFIGURABLE_TOOLSETS. This means_get_platform_tools()intools_config.pysilently excluded it when building the platform tool list for Discord/Telegram/CLI sessions.send_messagewas only working via legacy/composite toolset resolution paths — not through the proper configurable toolset pipeline. AddingmessagingtoCONFIGURABLE_TOOLSETSfixes this for bothsend_messageandread_channel.Use case
Enables the agent to read conversation context from other Discord channels/threads — useful for cross-channel awareness, summarizing discussions, and agent-to-agent collaboration.