gitlab_update_slack_integration
Configure Slack integration settings for GitLab projects by specifying the project ID, webhook URL, and optional channel and username. Streamline notifications and updates directly in Slack.
Instructions
Update Slack integration settings for a project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| channel | No | The Slack channel name | |
| project_id | Yes | The ID or URL-encoded path of the project | |
| username | No | The Slack username | |
| webhook | Yes | The Slack webhook URL |
Input Schema (JSON Schema)
{
"properties": {
"channel": {
"description": "The Slack channel name",
"type": "string"
},
"project_id": {
"description": "The ID or URL-encoded path of the project",
"type": "string"
},
"username": {
"description": "The Slack username",
"type": "string"
},
"webhook": {
"description": "The Slack webhook URL",
"type": "string"
}
},
"required": [
"project_id",
"webhook"
],
"type": "object"
}
Implementation Reference
- The primary handler function that implements the logic for gitlab_update_slack_integration. It extracts parameters, validates required fields (project_id, webhook), and delegates to context.integrationsManager.updateSlackIntegration to perform the update.export const updateSlackIntegration: ToolHandler = async (params, context) => { const { project_id, webhook, username, channel, notify_only_broken_pipelines, notify_only_default_branch, ...options } = params.arguments || {}; if (!project_id || !webhook) { throw new McpError(ErrorCode.InvalidParams, 'project_id and webhook are required'); } const data = await context.integrationsManager.updateSlackIntegration(project_id as string | number, { webhook, username, channel, notify_only_broken_pipelines, notify_only_default_branch, ...options }); return formatResponse(data); };
- src/utils/tools-data.ts:300-323 (schema)Defines the input schema and description for the gitlab_update_slack_integration tool, matching the handler parameters.name: 'gitlab_update_slack_integration', description: 'Update Slack integration settings for a project', inputSchema: { type: 'object', properties: { project_id: { type: 'string', description: 'The ID or URL-encoded path of the project' }, webhook: { type: 'string', description: 'The Slack webhook URL' }, username: { type: 'string', description: 'The Slack username' }, channel: { type: 'string', description: 'The Slack channel name' } }, required: ['project_id', 'webhook'] }
- src/utils/tool-registry.ts:40-40 (registration)Registers the tool name 'gitlab_update_slack_integration' to the updateSlackIntegration handler function from integration-handlers.ts in the central toolRegistry.gitlab_update_slack_integration: integrationHandlers.updateSlackIntegration,