gitlab_get_webhook
Retrieve detailed information about a specific webhook within a GitLab project by providing the project ID and webhook ID. Simplify webhook management and tracking.
Instructions
Get details of a specific webhook
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | Yes | The ID or URL-encoded path of the project | |
| webhook_id | Yes | The ID of the webhook |
Input Schema (JSON Schema)
{
"properties": {
"project_id": {
"description": "The ID or URL-encoded path of the project",
"type": "string"
},
"webhook_id": {
"description": "The ID of the webhook",
"type": "number"
}
},
"required": [
"project_id",
"webhook_id"
],
"type": "object"
}
Implementation Reference
- The main handler function that executes the gitlab_get_webhook tool logic by fetching the webhook details via integrationsManager and formatting the response.* Get webhook handler */ export const getWebhook: ToolHandler = async (params, context) => { const { project_id, webhook_id } = params.arguments || {}; if (!project_id || !webhook_id) { throw new McpError(ErrorCode.InvalidParams, 'project_id and webhook_id are required'); } const data = await context.integrationsManager.getWebhook(project_id as string | number, webhook_id as number); return formatResponse(data); };
- src/utils/tools-data.ts:353-370 (schema)The input schema definition specifying parameters for the gitlab_get_webhook tool.{ name: 'gitlab_get_webhook', description: 'Get details of a specific 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' } }, required: ['project_id', 'webhook_id'] } },
- src/utils/tool-registry.ts:43-43 (registration)Maps the tool name 'gitlab_get_webhook' to its handler function in the central tool registry.gitlab_get_webhook: integrationHandlers.getWebhook,