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"
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It discloses the return type ('Configured webhooks') and example response structure, which helps the agent understand the output. However, it lacks details on permissions, rate limits, or error handling, leaving some behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with sections for purpose, returns, usage, shows, example, and related tools. Each sentence adds value without redundancy, and it's front-loaded with key information, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description compensates by providing an example response and usage context. It covers the tool's purpose and behavior adequately for a read-only list operation, though it could include more on error cases or pagination for full completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the single parameter. The description does not add any parameter-specific information beyond what the schema provides, such as clarifying the 'project_id' usage. Baseline 3 is appropriate as the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('List') and resource ('project webhooks'), making the purpose specific. It distinguishes from siblings by focusing on webhooks rather than other project entities like issues or merge requests, and explicitly names related tools for webhook creation and testing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes an explicit 'Use when' section ('Checking integrations'), providing clear context for when to use this tool. It also lists related tools ('gitlab_create_project_hook', 'gitlab_test_project_hook') as alternatives for different operations, offering comprehensive guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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