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
| Name | Required | Description | Default |
|---|---|---|---|
| enable_ssl_verification | No | Enable SSL verification for the webhook | |
| issues_events | No | Trigger webhook for issues events | |
| merge_requests_events | No | Trigger webhook for merge request events | |
| project_id | Yes | The ID or URL-encoded path of the project | |
| push_events | No | Trigger webhook for push events | |
| token | No | Secret token to validate received payloads | |
| url | Yes | The webhook URL | |
| webhook_id | Yes | The 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); };
- src/utils/tools-data.ts:409-449 (schema)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'] }
- src/utils/tool-registry.ts:45-45 (registration)Registration of the 'gitlab_update_webhook' tool, mapping the tool name to its handler function from integrationHandlers.gitlab_update_webhook: integrationHandlers.updateWebhook,