Skip to main content
Glama

gitlab_list_user_events

Track and filter GitLab user activities like issue creation, comments, and code pushes. Use to analyze contributions, monitor actions, or create audit trails by filtering by action type, target type, and date range.

Instructions

Get user's activity feed Returns: Array of user activities Use when: Tracking user contributions, audit trail Filtering: By action type, target type, date range

Example activities:

  • Created issue #123

  • Commented on MR !456

  • Pushed to branch main

  • Closed issue #789

Related tools:

  • gitlab_list_project_members: Find users

  • gitlab_search_in_project: Search by user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionNoEvent action filter Type: string (enum) Options: - 'created': New items created - 'updated': Existing items modified - 'closed': Items closed - 'reopened': Items reopened - 'pushed': Code pushed - 'commented': Comments added - 'merged': MRs merged - 'joined': User joined project - 'left': User left project - 'destroyed': Items deleted - 'expired': Items expired Optional: Yes (returns all actions if not specified)
afterNoStart date for event filtering Type: string Format: ISO 8601 date Inclusive: Yes Optional: Yes Examples: - '2024-01-01' (events from start of 2024) - '2024-06-15T14:00:00Z' (specific time) See also: DESC_DATE_SINCE for similar functionality
beforeNoEnd date for event filtering Type: string Format: ISO 8601 date Inclusive: Yes Optional: Yes Examples: - '2024-12-31' (events until end of 2024) - '2024-06-15T14:00:00Z' (specific time) See also: DESC_DATE_UNTIL for similar functionality
pageNoPage 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_pageNoNumber 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_typeNoEvent target type filter Type: string (enum) Options: - 'Issue': Issue events - 'MergeRequest': MR events - 'Milestone': Milestone events - 'Note': Comment events - 'Project': Project events - 'Snippet': Snippet events - 'User': User events Optional: Yes (returns all types if not specified)
usernameYesGitLab username Type: string Format: Username without @ symbol Case: Case-sensitive Required: Yes Examples: - 'johndoe' (for @johndoe) - 'mary-smith' (for @mary-smith) - 'user123' (for @user123) Note: This is the username, not display name or email

Implementation Reference

  • The main handler function for the gitlab_list_user_events tool. Extracts parameters from arguments and calls the GitLabClient's get_user_events method to fetch user events.
    def handle_get_user_events(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> Dict[str, Any]: """Handle getting user events""" username = require_argument(arguments, "username") action = get_argument(arguments, "action") target_type = get_argument(arguments, "target_type") per_page = get_argument(arguments, "per_page", DEFAULT_PAGE_SIZE) page = get_argument(arguments, "page", 1) after = get_argument(arguments, "after") before = get_argument(arguments, "before") return client.get_user_events(username, action, target_type, per_page, page, after, before)
  • Registration of the tool name to its handler function in the TOOL_HANDLERS dictionary, used by server.py to dispatch tool calls.
    TOOL_LIST_USER_EVENTS: handle_get_user_events, TOOL_LIST_COMMITS: handle_get_commits,
  • Tool schema definition including input parameters, types, descriptions, and requirements as returned by list_tools().
    name=TOOL_LIST_USER_EVENTS, description=desc.DESC_LIST_USER_EVENTS, inputSchema={ "type": "object", "properties": { "username": {"type": "string", "description": desc.DESC_USERNAME}, "action": {"type": "string", "description": desc.DESC_ACTION_FILTER, "enum": ["commented", "pushed", "created", "closed", "opened", "merged", "joined", "left", "destroyed", "expired", "removed", "deleted", "approved", "updated", "uploaded", "downloaded"]}, "target_type": {"type": "string", "description": desc.DESC_TARGET_TYPE_FILTER, "enum": ["Note", "Issue", "MergeRequest", "Commit", "Project", "Snippet", "User", "WikiPage", "Milestone", "Discussion", "DiffNote"]}, "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}, "after": {"type": "string", "description": desc.DESC_DATE_AFTER}, "before": {"type": "string", "description": desc.DESC_DATE_BEFORE} }, "required": ["username"] }
  • Additional schema definition in tool_definitions.py (potentially used elsewhere).
    types.Tool( name=TOOL_LIST_USER_EVENTS, description=desc.DESC_LIST_USER_EVENTS, inputSchema={ "type": "object", "properties": { "username": {"type": "string", "description": desc.DESC_USERNAME}, "action": {"type": "string", "description": desc.DESC_ACTION_FILTER, "enum": ["commented", "pushed", "created", "closed", "opened", "merged", "joined", "left", "destroyed", "expired", "removed", "deleted", "approved", "updated", "uploaded", "downloaded"]}, "target_type": {"type": "string", "description": desc.DESC_TARGET_TYPE_FILTER, "enum": ["Note", "Issue", "MergeRequest", "Commit", "Project", "Snippet", "User", "WikiPage", "Milestone", "Discussion", "DiffNote"]}, "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}, "after": {"type": "string", "description": desc.DESC_DATE_AFTER}, "before": {"type": "string", "description": desc.DESC_DATE_BEFORE} }, "required": ["username"] } ),
  • Constant definition for the tool name used across the codebase.
    TOOL_LIST_USER_EVENTS = "gitlab_list_user_events"

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Vijay-Duke/mcp-gitlab'

If you have feedback or need assistance with the MCP directory API, please join our Discord server