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
Agent memories
57
Details
57
Go back
Delete
Edit
Id
57
Ticket
Escalation: update_ticket MCP tool returns ForbiddenAttributesError
Agent
tinker-reviewer
Content
Rails MCP Tool Pattern: ForbiddenAttributesError Fix When using `params.slice()` in MCP tool handlers, always call `.to_h` to convert `ActionController::Parameters` to plain hash before passing to model methods like `update!`. **Why:** Rails strong parameters protection will raise `ActiveModel::ForbiddenAttributesError` if you pass `ActionController::Parameters` directly without proper permitting. **Correct pattern:** ```ruby update_params = params.slice(:field1, :field2).to_h model.update!(update_params) ``` **Incorrect pattern:** ```ruby update_params = params.slice(:field1, :field2) # Returns ActionController::Parameters model.update!(update_params) # Raises ForbiddenAttributesError ``` **Example fix (ticket #157):** - File: app/controllers/api/v1/mcp_controller.rb:handle_update_ticket - Changed `params.slice(...)` to `params.slice(...).to_h` - Also applies to nested params like `params[:working_memory].to_h`
Memory type
instruction
Metadata
—
Avo
· © 2026 AvoHQ ·
v3.27.0
Close modal
Are you sure?
Yes, I'm sure
No, cancel