Review: Add list_messages tool — read group message history via MCP
Verdict: READY
Template Completeness
- [x] Lineage — present (companion to groupme-sdk#3, SSH workflow context)
- [x] Repo — present (forgejo_admin/groupme-mcp)
- [x] User Story — present and well-formed (operator reads history via MCP)
- [x] Context — present (explains send-only gap, SDK dependency)
- [x] File Targets — present (modify messages.py, explicit "do not touch" list)
- [x] Acceptance Criteria — present (6 criteria covering core behavior)
- [x] Test Expectations — present (2 unit tests + run command)
- [x] Constraints — present (follow existing patterns, _resolve_group, read-only, deploy order)
- [x] Checklist — present
- [x] Related — present (SDK dep + project page)
File Targets
- [x]
src/groupme_mcp/tools/messages.py— verified exists. Currently contains onlysend_message. Addinglist_messageshere is the correct location. The import pattern (from ..server import _error_response, _ok, _resolve_group, get_client, mcp) is already in place. - [x]
tests/test_messages.py— verified exists (not mentioned in ticket but implied by test expectations). Currently contains 3 tests forsend_message. New tests should follow same pattern. - [x]
tests/conftest.py— verified. Already patchesget_clientand_resolve_groupin the messages module. No changes needed for new tool. - [x]
src/groupme_mcp/tools/__init__.py— verified. Already importsmessagesmodule. No changes needed since new tool uses@mcp.tool()decorator auto-registration.
Repo Placement
Correct. Issue is filed on
forgejo_admin/groupme-mcp and all file targets are within that repo. SDK dependency is correctly tracked as a separate issue on forgejo_admin/groupme-sdk.Dependencies
- groupme-sdk#3 (board item #378) — OPEN, in
todocolumn. The SDK does NOT yet have alist_messagesmethod. TheMessagesMixiningroupme-sdk/src/groupme_sdk/messages.pyonly hassend_message. This is correctly documented in the ticket's Constraints ("Deploy order: groupme-sdk#3 must publish first, then this") and in the board labels (depends:groupme-sdk#3). - Both items share
story:GM-5label — consistent lineage. - No other blockers identified on the board.
Acceptance Criteria
- [x] "list_messages returns recent messages (default 20)" — testable via mock
- [x] "Uses _resolve_group for name-based resolution" — testable, helper already exists and is patched in conftest
- [x] "Each message includes: sender nickname, text, created_at, attachment URLs" — testable via mock return data
- [x] "before_id param for pagination" — testable, verify param passed to SDK
- [x] "limit param (default 20, max 100)" — testable, should include validation test for max boundary
- [x] "Read-only — NOT gated by PreToolUse approval hook" — verified.
block-groupme-send.shonly matchessend_message,add_member,remove_member. A newlist_messagestool falls through to the*)case and exits 0 (allow). No hook changes needed.
Blast Radius
- No downstream consumers affected — this is a new read-only tool addition.
- No existing tools modified.
- The
__init__.pyregistration andconftest.pymock patches already cover the messages module — no structural changes needed. - The PreToolUse hook (
block-groupme-send.sh) is safe — itscasematcher is tool-name-specific and won't accidentally gate the new read tool.
Recommendation
No action needed. Scope is solid. All file targets verified. Dependencies are correctly documented and tracked on the board. The only execution constraint is deploy order: groupme-sdk#3 must merge and publish before this ticket can be implemented (the SDK method does not yet exist). An agent can execute this ticket as-is once the SDK dependency ships.