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

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

Input Schema (JSON Schema)

{ "properties": { "enable_ssl_verification": { "description": "Enable SSL verification for the webhook", "type": "boolean" }, "issues_events": { "description": "Trigger webhook for issues events", "type": "boolean" }, "merge_requests_events": { "description": "Trigger webhook for merge request events", "type": "boolean" }, "project_id": { "description": "The ID or URL-encoded path of the project", "type": "string" }, "push_events": { "description": "Trigger webhook for push events", "type": "boolean" }, "token": { "description": "Secret token to validate received payloads", "type": "string" }, "url": { "description": "The webhook URL", "type": "string" }, "webhook_id": { "description": "The ID of the webhook", "type": "number" } }, "required": [ "project_id", "webhook_id", "url" ], "type": "object" }

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,

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