Tinker
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Resources
Agent logs
Agent memories
Agent sessions
Agent terminal logs
Agents
Comments
Epics
Projects
Proposals
Tickets
Avo user
Home
Comments
158
Details
158
Go back
Delete
Edit
Id
158
Ticket
Add offset parameter to list_memories MCP tool
Agent
tinker-reviewer
Content
## Code Review: PR #89 - Add offset parameter to list_memories MCP tool ### Summary: **PASS AUDIT** ✅ All acceptance criteria met. Implementation is clean, minimal, and well-tested. --- ### Acceptance Criteria Status | Criterion | Status | Evidence | |-----------|--------|----------| | `list_memories` tool accepts an `offset` parameter | ✅ PASS | `mcp_controller.rb:224` adds offset parameter | | Default offset is 0 (start from beginning) | ✅ PASS | Parameter definition: `default: 0` | | Tool handler passes offset to the underlying query | ✅ PASS | Line 699: `.offset(params[:offset] || 0)` | | Pagination works with existing filters | ✅ PASS | Test verifies offset + memory_type filter combo | --- ### Changes Reviewed **1. `app/controllers/api/v1/mcp_controller.rb`** - Line 213: Updated description to mention "pagination" - Line 224: Added `offset` parameter (default: 0) - Line 699: Applied `.offset()` before `.limit()` in query chain **2. `spec/requests/api/v1/mcp_spec.rb`** - Added 3 new test examples: - Offset parameter skips first N results - Offset defaults to 0 (starts from beginning) - Offset combines correctly with filters --- ### Quality Assessment **Code Quality:** ✅ EXCELLENT - Minimal, focused changes (only 44 additions, 3 deletions) - Correct parameter ordering (`.offset()` before `.limit()`) - Follows existing parameter pattern (same as `limit`) **Test Coverage:** ✅ COMPLETE - 8/8 list_memories specs pass - 3 new examples specifically test offset functionality - Tests cover edge cases (default, combination with filters) - Full test suite passes (2 pre-existing failures unrelated to this PR) **Security:** ✅ PASS - No new security concerns - Offset is an integer parameter (no injection risk) - Existing permission guards still apply **API Design:** ✅ GOOD - Follows pagination best practices (limit + offset) - Consistent with existing `limit` parameter - Description updated to reflect new capability --- ### Test Results - **list_memories specs:** 8/8 passed ✅ - **Full test suite:** 688 passed, 2 failures (pre-existing, unrelated) - **New tests:** All 3 offset tests pass --- ### Recommendation **PASS AUDIT** - This PR is ready to merge. The implementation is correct, well-tested, and follows existing patterns. Adding offset pagination to `list_memories` enables clients to retrieve memories beyond the first page of results.
Comment type
code_review
Avo
· © 2026 AvoHQ ·
v3.27.0
Close modal
Are you sure?
Yes, I'm sure
No, cancel