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
Epics
Fix list_tickets MCP tool: remove draft exclusion, always include draft tickets
Edit
Fix list_tickets MCP tool: remove draft exclusion, always include draft tickets
Cancel
Save
Title
*
Project
*
Choose an option
alpha
tinker
Create new project
Description
**Bug:** `list_tickets` MCP tool excludes draft tickets by default, even when explicitly filtering by `status: "draft"`. **Root cause:** In `app/controllers/api/v1/mcp_controller.rb`, the `handle_list_tickets` method excludes draft tickets FIRST (lines 582-585), then applies the status filter. So requesting `status: "draft"` returns empty results. ```ruby # Exclude draft tickets by default unless include_drafts is true unless [true, "true"].include?(params[:include_drafts]) tickets = tickets.where.not(status: "draft") # Removes drafts end # Later... tickets = tickets.where(status: params[:status]) if params[:status] # Too late! ``` **Fix:** Remove the draft exclusion logic entirely. Draft tickets are a valid state and should be included like any other status. **Change:** Delete lines 582-585 from `handle_list_tickets`: ```ruby # DELETE THIS BLOCK: # Exclude draft tickets by default unless include_drafts is true unless [true, "true"].include?(params[:include_drafts]) tickets = tickets.where.not(status: "draft") end ``` Also remove the `include_drafts` parameter from the MCP tool definition (line 147-148).
Avo
· © 2026 AvoHQ ·
v3.27.0
Close modal
Are you sure?
Yes, I'm sure
No, cancel