Skip to main content
Glama

gitlab_update_webhook

Modify an existing webhook in GitLab MCP Server by updating its URL, events, and settings to ensure accurate and secure integration with external systems.

Instructions

Update an existing webhook

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
enable_ssl_verificationNoEnable SSL verification for the webhook
issues_eventsNoTrigger webhook for issues events
merge_requests_eventsNoTrigger webhook for merge request events
project_idYesThe ID or URL-encoded path of the project
push_eventsNoTrigger webhook for push events
tokenNoSecret token to validate received payloads
urlYesThe webhook URL
webhook_idYesThe ID of the webhook

Implementation Reference

  • The handler function that implements the core logic for the 'gitlab_update_webhook' tool. It extracts parameters, validates inputs, calls the integrationsManager.updateWebhook method, and formats the response.
    export const updateWebhook: ToolHandler = async (params, context) => {
      const { project_id, webhook_id, ...options } = params.arguments || {};
      if (!project_id || !webhook_id) {
        throw new McpError(ErrorCode.InvalidParams, 'project_id and webhook_id are required');
      }
      
      if (!options.url) {
        throw new McpError(ErrorCode.InvalidParams, 'url is required for webhook');
      }
      
      const data = await context.integrationsManager.updateWebhook(project_id as string | number, webhook_id as number, options as {
        url: string;
        name?: string;
        description?: string;
        token?: string;
        push_events?: boolean;
        push_events_branch_filter?: string;
        issues_events?: boolean;
        confidential_issues_events?: boolean;
        merge_requests_events?: boolean;
        tag_push_events?: boolean;
        note_events?: boolean;
        confidential_note_events?: boolean;
        job_events?: boolean;
        pipeline_events?: boolean;
        wiki_page_events?: boolean;
        deployment_events?: boolean;
        releases_events?: boolean;
        feature_flag_events?: boolean;
        enable_ssl_verification?: boolean;
        custom_webhook_template?: string;
        custom_headers?: Array<{key: string; value?: string}>;
      });
      return formatResponse(data);
    };
  • The input schema definition for the 'gitlab_update_webhook' tool, specifying parameters, types, descriptions, and required fields.
    {
      name: 'gitlab_update_webhook',
      description: 'Update an existing webhook',
      inputSchema: {
        type: 'object',
        properties: {
          project_id: {
            type: 'string',
            description: 'The ID or URL-encoded path of the project'
          },
          webhook_id: {
            type: 'number',
            description: 'The ID of the webhook'
          },
          url: {
            type: 'string',
            description: 'The webhook URL'
          },
          token: {
            type: 'string',
            description: 'Secret token to validate received payloads'
          },
          push_events: {
            type: 'boolean',
            description: 'Trigger webhook for push events'
          },
          issues_events: {
            type: 'boolean',
            description: 'Trigger webhook for issues events'
          },
          merge_requests_events: {
            type: 'boolean',
            description: 'Trigger webhook for merge request events'
          },
          enable_ssl_verification: {
            type: 'boolean',
            description: 'Enable SSL verification for the webhook'
          }
        },
        required: ['project_id', 'webhook_id', 'url']
      }
  • Registration of the 'gitlab_update_webhook' tool, mapping the tool name to its handler function from integrationHandlers.
    gitlab_update_webhook: integrationHandlers.updateWebhook,
Behavior2/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 of behavioral disclosure. While 'update' implies a mutation, it doesn't specify whether this requires specific permissions, what happens to unspecified fields (partial vs. full update), potential side effects, or error conditions. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, stating the core purpose immediately without unnecessary elaboration. Every word earns its place, making it highly concise and well-structured.

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

Completeness2/5

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

Given the complexity (8 parameters, mutation operation) and lack of annotations or output schema, the description is incomplete. It doesn't explain what the update returns, error handling, or behavioral nuances. For a tool that modifies webhooks in a GitLab context, more detail on permissions, partial updates, or interaction with sibling tools would be needed for adequate 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?

The schema description coverage is 100%, with all 8 parameters clearly documented in the input schema. The description adds no additional parameter information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting. However, it doesn't compensate for any gaps since there are none.

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

Purpose3/5

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

The description states 'Update an existing webhook' which clearly indicates the verb (update) and resource (webhook), but it's vague about what specifically gets updated. It doesn't distinguish from sibling tools like 'gitlab_update_cicd_variable' or 'gitlab_update_trigger_token' beyond the resource name, nor does it mention the project context implied by the required parameters.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing webhook ID), when not to use it, or how it differs from related tools like 'gitlab_add_webhook' or 'gitlab_delete_webhook'. The description is purely functional without contextual advice.

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

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/rifqi96/mcp-gitlab'

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