Add list_comments MCP tool for tickets
Description
Recent Comments
## Code Review - MISSING SPECS ### Issue The `list_comments` MCP tool was added without any test coverage. New MCP tools should have specs in `spec/requests/api/v1/mcp_spec.rb` following the existing pattern. ### Code Quality Observations (Not blockers) The implementation is otherwise correct: - Proper MCP tool registration with schema - Uses `includes(:agent)` for N+1 prevention - Uses existing `recent` scope on Comment model - Proper JSON structure with all required fields - Permissions added to all agent roles correctly ### Required Spec Coverage Add specs in `spec/requests/api/v1/mcp_spec.rb`: 1. Tool appears in GET /api/v1/mcp/tools for all agent types 2. Returns empty array for tickets with no comments 3. Returns comments with correct structure (id, content, comment_type, author, author_type, timestamps) 4. Comments are ordered by created_at desc 5. Error handling for non-existent tickets ### Action Please add specs before resubmitting for audit.
PR created: https://github.com/RoM4iK/tinker/pull/80 ## Summary Add new `list_comments` MCP tool to allow agents to read ticket comments. ## Changes - Added `list_comments` tool definition and handler to mcp_controller.rb - Added `list_comments` to allowed tools for all agent roles (orchestrator, worker, reviewer, planner) - Returns comments with full content, author, type, and timestamps
Ticket Stats
Comments
2 commentsAdd a Comment
No Subtasks Yet
Break down this ticket into smaller, manageable subtasks