gitlab_get_user_activity_feed
Retrieve a comprehensive timeline of user activities on GitLab, including commits, issues, MRs, and comments across projects. Filter by action, target, date, and paginate results for detailed tracking, reporting, or debugging workflows.
Instructions
Retrieve user's complete activity/events timeline
Get chronological feed of all user activities including commits, issues, MRs, comments, and other interactions across all accessible projects.
Returns activity timeline with:
Event details: type, target, description
Timestamps: creation and update times
Project context: where activity occurred
Related objects: linked issues, MRs, commits
Action metadata: push details, comment excerpts
Use cases:
Track user engagement patterns
Monitor team member activities
Generate activity reports
Debug user workflow issues
Parameters:
user_id: Numeric user ID
username: Username string (use either user_id or username)
action: Filter by action type (created, updated, closed, merged, etc.)
target_type: Filter by target (Issue, MergeRequest, Project, etc.)
after: Events after this date (YYYY-MM-DD)
before: Events before this date (YYYY-MM-DD)
per_page: Results per page (default: 20)
page: Page number (default: 1)
Example: Get recent issue activities
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Filter by action type | |
| after | No | Events after this date (YYYY-MM-DD) | |
| before | No | Events before this date (YYYY-MM-DD) | |
| page | No | Page number for pagination Type: integer Range: ≥1 Default: 1 Example: 3 (to get the third page of results) Note: Use with per_page to navigate large result sets | |
| per_page | No | Number of results per page Type: integer Range: 1-100 Default: 20 Example: 50 (for faster browsing) Tip: Use smaller values (10-20) for detailed operations, larger (50-100) for listing | |
| target_type | No | Filter by target type | |
| user_id | No | Numeric user ID | |
| username | No | Username string |
Implementation Reference
- src/mcp_gitlab/tool_handlers.py:699-720 (handler)The main handler function for the gitlab_get_user_activity_feed tool. Extracts parameters from arguments and delegates to GitLabClient.get_user_activity_feed() to fetch the user's activity feed.def handle_get_user_activity_feed(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting user activity feed""" user_id = get_argument(arguments, "user_id") username = get_argument(arguments, "username") action = get_argument(arguments, "action") target_type = get_argument(arguments, "target_type") after = get_argument(arguments, "after") before = get_argument(arguments, "before") per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE) page = get_argument(arguments, "page", 1) return client.get_user_activity_feed( user_id=user_id, username=username, action=action, target_type=target_type, after=after, before=before, per_page=per_page, page=page )
- src/mcp_gitlab/tool_handlers.py:1077-1078 (registration)Registration of the handler function in the TOOL_HANDLERS dictionary, used by server.py to dispatch tool calls.TOOL_GET_USER_ACTIVITY_FEED: handle_get_user_activity_feed,
- Pydantic/MCP tool schema definition including input parameters validation and description.types.Tool( name=TOOL_GET_USER_ACTIVITY_FEED, description=desc.DESC_GET_USER_ACTIVITY_FEED, inputSchema={ "type": "object", "properties": { "username": {"type": "string", "description": "Username string"}, "action": {"type": "string", "description": "Event action type", "enum": ["created", "updated", "closed", "reopened", "pushed", "commented", "merged", "joined", "left", "destroyed", "expired", "approved"]}, "target_type": {"type": "string", "description": "Event target type", "enum": ["issue", "milestone", "merge_request", "note", "project", "snippet", "user", "wiki"]}, "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": SMALL_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE}, "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1} }, "required": ["username"] } ),
- src/mcp_gitlab/server.py:1014-1030 (registration)MCP server tool registration in handle_list_tools() method, defining the tool schema served to MCP clients.types.Tool( name=TOOL_GET_USER_ACTIVITY_FEED, description=desc.DESC_GET_USER_ACTIVITY_FEED, inputSchema={ "type": "object", "properties": { "user_id": {"type": "string", "description": "Numeric user ID"}, "username": {"type": "string", "description": "Username string"}, "action": {"type": "string", "description": "Filter by action type"}, "target_type": {"type": "string", "description": "Filter by target type"}, "after": {"type": "string", "description": "Events after this date (YYYY-MM-DD)"}, "before": {"type": "string", "description": "Events before this date (YYYY-MM-DD)"}, "per_page": {"type": "integer", "description": desc.DESC_PER_PAGE, "default": DEFAULT_PAGE_SIZE, "minimum": 1, "maximum": MAX_PAGE_SIZE}, "page": {"type": "integer", "description": desc.DESC_PAGE_NUMBER, "default": 1, "minimum": 1} } } ),
- src/mcp_gitlab/constants.py:254-255 (helper)Constant definition for the tool name used throughout the codebase.TOOL_GET_USER_CONTRIBUTIONS_SUMMARY = "gitlab_get_user_contributions_summary" TOOL_GET_USER_ACTIVITY_FEED = "gitlab_get_user_activity_feed"