Skip to main content
Glama

gitlab_list_project_hooks

Retrieve configured webhooks for a GitLab project to monitor integrations, showing URLs, events, and configuration details.

Instructions

List project webhooks Returns: Configured webhooks Use when: Checking integrations Shows: URLs, events, configuration

Example response: [{ "id": 1, "url": "https://example.com/hook", "push_events": true, "issues_events": true, "merge_requests_events": true, "wiki_page_events": false }]

Related tools:

  • gitlab_create_project_hook: Add webhook

  • gitlab_test_project_hook: Test webhook

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNoProject identifier (auto-detected if not provided) Type: integer OR string Format: numeric ID or 'namespace/project' Optional: Yes - auto-detects from current git repository Examples: - 12345 (numeric ID) - 'gitlab-org/gitlab' (namespace/project path) - 'my-group/my-subgroup/my-project' (nested groups) Note: If in a git repo with GitLab remote, this can be omitted

Implementation Reference

  • Handler function that executes the tool: gets project_id (auto-detects if missing), calls GitLabClient.get_project_hooks(project_id)
    def handle_get_project_hooks(client: GitLabClient, arguments: Optional[Dict[str, Any]]) -> List[Dict[str, Any]]:
        """Handle getting project webhooks"""
        project_id = require_project_id(client, arguments)
        
        return client.get_project_hooks(project_id)
  • TOOL_HANDLERS dict maps tool name to handler function; dispatched in server.py @server.call_tool()
    TOOL_LIST_PROJECT_MEMBERS: handle_get_project_members,
    TOOL_LIST_PROJECT_HOOKS: handle_get_project_hooks,
    TOOL_LIST_GROUPS: handle_list_groups,
  • Tool schema definition (input validation) defining project_id parameter
        name=TOOL_LIST_PROJECT_HOOKS,
        description=desc.DESC_LIST_PROJECT_HOOKS,
        inputSchema={
            "type": "object",
            "properties": {
                "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID}
            }
        }
    ),
  • Tool registration in @server.list_tools() returning the schema for MCP protocol
        name=TOOL_LIST_PROJECT_HOOKS,
        description=desc.DESC_LIST_PROJECT_HOOKS,
        inputSchema={
            "type": "object",
            "properties": {
                "project_id": {"type": "string", "description": desc.DESC_PROJECT_ID}
            }
        }
    ),
  • Constant defining the tool name string for consistent usage across files
    TOOL_LIST_PROJECT_HOOKS = "gitlab_list_project_hooks"

Tool Definition Quality

Score is being calculated. Check back soon.

Install Server

Other 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