Add list_dm_messages tool for reading DM thread history #9
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Feature
Lineage
Standalone — discovered during 2026-04-10 Westside Ops session. While preparing Lucas for a meeting with Coach Marcus, I needed to read the full Marcus DM thread to understand what Marcus had asked for. The current groupme-mcp exposes
list_dm_chats(which returns only the last-message preview) andsend_dm, but nolist_dm_messagestool for reading the conversation history. This left a gap where I could only see the single most recent line of a 26-message DM conversation.Repo
forgejo_admin/groupme-mcpUser Story
As an operational agent working with Lucas on Westside tasks
I want to read the full message history of a GroupMe direct message thread
So that I can understand context, asks, and decisions Marcus has communicated privately — not just the latest message
Context
The GroupMe REST API exposes
GET /v3/direct_messageswhich takes another_user_idparameter and returns a paginated list of direct messages between the authenticated user and that user. Documentation: https://dev.groupme.com/docs/v3#direct_messages_indexThe groupme-mcp currently wraps:
list_dm_chats— returns DM conversation list with last-message previewsend_dm— posts a new DMlist_groups,list_messages,send_message, etc.)Missing:
list_dm_messages— fetch message history for a specific DM threadThis is a straightforward addition. The group-oriented
list_messagestool already exists as a model: it takes agroup_name, limit, andbefore_idfor pagination. The newlist_dm_messagesshould follow the same pattern but takeother_user_id(or optionallyother_user_nameresolved vialist_dm_chats) instead ofgroup_name.File Targets
Files to modify:
src/groupme_mcp/tools/dm.py(or equivalent — whereversend_dmandlist_dm_chatslive) — addlist_dm_messagestool implementationsrc/groupme_mcp/server.py(or wherever tools are registered) — register the new tooltests/test_dm.py— new tests for the tooldirect_messages()method — if not, that may need to be added there first as a dependency changeFiles NOT to touch:
Acceptance Criteria
list_dm_messagesis exposed and callableother_user_id(required),limit(default 20, max 100),before_id(optional for pagination)list_messagesshape:id,sender,text,created_atother_user_idfromlist_dm_chats, returns the full message history for that DM threadother_user_id, returns a clear error (not a traceback)before_idworks — calling with the oldest returnedidreturns the next older batchdescriptionfield so MCP clients know what it doesTest Expectations
tests/test_dm.py::test_list_dm_messages_default_limit— mock GroupMe API, assert 20 messages returnedtests/test_dm.py::test_list_dm_messages_pagination— assertbefore_idparam is passed through correctlytests/test_dm.py::test_list_dm_messages_invalid_user— assert clean error for bad user_idcd ~/groupme-mcp && pytest tests/test_dm.py -vConstraints
list_messages(group) tool signature and return shape for consistencylist_dm_chatsorsend_dm(both are actively used)Checklist
descriptionRelated
westside-mcp— project this affects (if westside-mcp is where this MCP is hosted/tracked)pal-e-platform— platform tooling umbrella