Loading
Expose list_user_events as MCP tool from user events endpoint
What does this merge request do and why?
AI agents frequently need to inspect a user's recent activity (for example to determine whether a contributor has been active recently, what issues/MRs they commented on, or recent pushes). While get_user returns user profile metadata, there was previously no MCP tool to query recent user activity.
This MR exposes the existing GET /users/:id/events API endpoint as the list_user_events MCP tool:
- Supports filtering by
action,target_type,before,after, and sorting withsort(asc/desc). - Supports pagination via
pageandper_page. - Grants
mcpscope access viaMcpAccess. - Inherits all existing privacy and visibility controls from the user events API.
References
Closes #635916
How to set up and validate locally
bundle exec rspec spec/requests/api/events_spec.rb spec/requests/api/mcp/handlers/list_tools_spec.rb ee/spec/requests/api/mcp/handlers/list_tools_spec.rbChangelog: added