Add list_messages tool — read group message history via MCP #5

Closed
opened 2026-03-26 06:10:50 +00:00 by forgejo_admin · 1 comment

Type

Feature

Lineage

Companion to groupme-sdk#3. Remote SSH workflow needs GroupMe as bidirectional channel.

Repo

forgejo_admin/groupme-mcp

User Story

As platform operator working via SSH,
I want to read GroupMe message history via MCP tools,
So that I can see what Marcus sent (text, images, context) without leaving the terminal.

Context

The MCP can send messages but can't read them. get_group only shows the latest message preview. For the SSH workflow, reading full message history is essential — including image attachment URLs.

Depends on groupme-sdk#3 (list_messages method).

File Targets

Files to modify:

  • src/groupme_mcp/tools/messages.py — ADD list_messages(group_name, limit=20, before_id=None) tool. Uses _resolve_group for name-based resolution. Returns messages with sender name, text, timestamps, and attachment URLs.

Files NOT to touch:

  • Other tool files — single tool addition
  • SDK — separate ticket (groupme-sdk#3)

Acceptance Criteria

  • list_messages(group_name) returns recent messages (default 20)
  • Uses _resolve_group for name-based resolution (consistent with all other tools)
  • Each message in response includes: sender nickname, text, created_at, attachment URLs
  • before_id param for pagination
  • limit param (default 20, max 100)
  • Read-only tool — NOT gated by PreToolUse approval hook

Test Expectations

  • Unit test: list_messages resolves group name and returns messages
  • Unit test: pagination params passed to SDK correctly
  • Run command: cd ~/groupme-mcp && pytest tests/

Constraints

  • Follow existing tool patterns in groupme-mcp
  • Uses _resolve_group helper (already exists)
  • Read-only — excluded from PreToolUse approval hook (same as list_members, get_group)
  • Deploy order: groupme-sdk#3 must publish first, then this

Checklist

  • PR opened
  • Tests pass
  • No unrelated changes
  • groupme-sdk#3 — SDK dependency (must deploy first)
  • project-groupme-westside — GroupMe project page
### Type Feature ### Lineage Companion to groupme-sdk#3. Remote SSH workflow needs GroupMe as bidirectional channel. ### Repo `forgejo_admin/groupme-mcp` ### User Story As platform operator working via SSH, I want to read GroupMe message history via MCP tools, So that I can see what Marcus sent (text, images, context) without leaving the terminal. ### Context The MCP can send messages but can't read them. `get_group` only shows the latest message preview. For the SSH workflow, reading full message history is essential — including image attachment URLs. Depends on groupme-sdk#3 (`list_messages` method). ### File Targets Files to modify: - `src/groupme_mcp/tools/messages.py` — ADD `list_messages(group_name, limit=20, before_id=None)` tool. Uses `_resolve_group` for name-based resolution. Returns messages with sender name, text, timestamps, and attachment URLs. Files NOT to touch: - Other tool files — single tool addition - SDK — separate ticket (groupme-sdk#3) ### Acceptance Criteria - [ ] `list_messages(group_name)` returns recent messages (default 20) - [ ] Uses `_resolve_group` for name-based resolution (consistent with all other tools) - [ ] Each message in response includes: sender nickname, text, created_at, attachment URLs - [ ] `before_id` param for pagination - [ ] `limit` param (default 20, max 100) - [ ] Read-only tool — NOT gated by PreToolUse approval hook ### Test Expectations - [ ] Unit test: list_messages resolves group name and returns messages - [ ] Unit test: pagination params passed to SDK correctly - Run command: `cd ~/groupme-mcp && pytest tests/` ### Constraints - Follow existing tool patterns in groupme-mcp - Uses `_resolve_group` helper (already exists) - Read-only — excluded from PreToolUse approval hook (same as list_members, get_group) - Deploy order: groupme-sdk#3 must publish first, then this ### Checklist - [ ] PR opened - [ ] Tests pass - [ ] No unrelated changes ### Related - `groupme-sdk#3` — SDK dependency (must deploy first) - `project-groupme-westside` — GroupMe project page
Author
Owner

Scope Review: READY

Review note: review-379-2026-03-25
Scope is solid — all 10 template sections present, all file targets verified in codebase, dependency on groupme-sdk#3 correctly documented and tracked (board item #378, todo column). PreToolUse hook confirmed safe for new read-only tool. No action needed before execution; blocked only on SDK dependency shipping first.

## Scope Review: READY Review note: `review-379-2026-03-25` Scope is solid — all 10 template sections present, all file targets verified in codebase, dependency on groupme-sdk#3 correctly documented and tracked (board item #378, `todo` column). PreToolUse hook confirmed safe for new read-only tool. No action needed before execution; blocked only on SDK dependency shipping first.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/groupme-mcp#5
No description provided.