naftiko: 1.0.0-alpha2 info: label: GitLab API — hooks description: 'GitLab API — hooks. 22 operations. Lead operation: List system hooks. Self-contained Naftiko capability covering one Gitlab Ci business surface.' tags: - Gitlab Ci - hooks created: '2026-05-19' modified: '2026-05-19' binds: - namespace: env keys: GITLAB_CI_API_KEY: GITLAB_CI_API_KEY capability: consumes: - type: http namespace: gitlab-ci-hooks baseUri: https://gitlab.com description: GitLab API — hooks business capability. Self-contained, no shared references. resources: - name: api-v4-hooks path: /api/v4/hooks operations: - name: getapiv4hooks method: GET description: List system hooks outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: page in: query type: integer description: Current page number - name: per_page in: query type: integer description: Number of items per page - name: postapiv4hooks method: POST description: Add new system hook outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: postApiV4Hooks in: body type: string required: true - name: api-v4-hooks-hook_id path: /api/v4/hooks/{hook_id} operations: - name: getapiv4hookshookid method: GET description: Get system hook outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the system hook required: true - name: putapiv4hookshookid method: PUT description: Edit system hook outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the system hook required: true - name: putApiV4HooksHookId in: body type: string required: true - name: postapiv4hookshookid method: POST description: Test a hook outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: deleteapiv4hookshookid method: DELETE description: Delete system hook outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the system hook required: true - name: api-v4-hooks-hook_id-custom_headers-key path: /api/v4/hooks/{hook_id}/custom_headers/{key} operations: - name: putapiv4hookshookidcustomheaderskey method: PUT description: Set a custom header outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: key in: path type: string description: The name of the custom header required: true - name: putApiV4HooksHookIdCustomHeadersKey in: body type: string required: true - name: deleteapiv4hookshookidcustomheaderskey method: DELETE description: Un-Set a custom header outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: key in: path type: string description: The name of the custom header required: true - name: api-v4-hooks-hook_id-url_variables-key path: /api/v4/hooks/{hook_id}/url_variables/{key} operations: - name: putapiv4hookshookidurlvariableskey method: PUT description: Set a url variable outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: key in: path type: string description: The key of the variable required: true - name: putApiV4HooksHookIdUrlVariablesKey in: body type: string required: true - name: deleteapiv4hookshookidurlvariableskey method: DELETE description: Un-Set a url variable outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: key in: path type: string description: The key of the variable required: true - name: api-v4-projects-id-hooks path: /api/v4/projects/{id}/hooks operations: - name: getapiv4projectsidhooks method: GET description: List project hooks outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the project required: true - name: page in: query type: integer description: Current page number - name: per_page in: query type: integer description: Number of items per page - name: postapiv4projectsidhooks method: POST description: Add project hook outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the project required: true - name: postApiV4ProjectsIdHooks in: body type: string required: true - name: api-v4-projects-id-hooks-hook_id path: /api/v4/projects/{id}/hooks/{hook_id} operations: - name: getapiv4projectsidhookshookid method: GET description: Get project hook outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the project required: true - name: hook_id in: path type: integer description: The ID of a project hook required: true - name: putapiv4projectsidhookshookid method: PUT description: Edit project hook outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the project required: true - name: hook_id in: path type: integer description: The ID of the project hook required: true - name: putApiV4ProjectsIdHooksHookId in: body type: string required: true - name: deleteapiv4projectsidhookshookid method: DELETE description: Delete a project hook outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: string description: The ID or URL-encoded path of the project required: true - name: hook_id in: path type: integer description: The ID of the project hook required: true - name: api-v4-projects-id-hooks-hook_id-custom_headers-key path: /api/v4/projects/{id}/hooks/{hook_id}/custom_headers/{key} operations: - name: putapiv4projectsidhookshookidcustomheaderskey method: PUT description: Set a custom header outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: key in: path type: string description: The name of the custom header required: true - name: id in: path type: integer required: true - name: putApiV4ProjectsIdHooksHookIdCustomHeadersKey in: body type: string required: true - name: deleteapiv4projectsidhookshookidcustomheaderskey method: DELETE description: Un-Set a custom header outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: key in: path type: string description: The name of the custom header required: true - name: id in: path type: integer required: true - name: api-v4-projects-id-hooks-hook_id-events path: /api/v4/projects/{id}/hooks/{hook_id}/events operations: - name: getapiv4projectsidhookshookidevents method: GET description: Get events for a given hook id outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: status in: query type: array description: HTTP status code of the event - name: per_page in: query type: integer description: Number of items per page - name: page in: query type: integer description: Current page number - name: id in: path type: integer required: true - name: hook_id in: path type: integer required: true - name: api-v4-projects-id-hooks-hook_id-events-hook_log_id-resend path: /api/v4/projects/{id}/hooks/{hook_id}/events/{hook_log_id}/resend operations: - name: postapiv4projectsidhookshookideventshooklogidresend method: POST description: Resend a webhook event outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: id in: path type: integer required: true - name: hook_id in: path type: integer required: true - name: hook_log_id in: path type: integer required: true - name: api-v4-projects-id-hooks-hook_id-test-trigger path: /api/v4/projects/{id}/hooks/{hook_id}/test/{trigger} operations: - name: postapiv4projectsidhookshookidtesttrigger method: POST description: Triggers a hook test outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: trigger in: path type: string description: The type of trigger hook required: true - name: id in: path type: integer required: true - name: api-v4-projects-id-hooks-hook_id-url_variables-key path: /api/v4/projects/{id}/hooks/{hook_id}/url_variables/{key} operations: - name: putapiv4projectsidhookshookidurlvariableskey method: PUT description: Set a url variable outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: key in: path type: string description: The key of the variable required: true - name: id in: path type: integer required: true - name: putApiV4ProjectsIdHooksHookIdUrlVariablesKey in: body type: string required: true - name: deleteapiv4projectsidhookshookidurlvariableskey method: DELETE description: Un-Set a url variable outputRawFormat: json outputParameters: - name: result type: object value: $. inputParameters: - name: hook_id in: path type: integer description: The ID of the hook required: true - name: key in: path type: string description: The key of the variable required: true - name: id in: path type: integer required: true exposes: - type: rest namespace: gitlab-ci-hooks-rest port: 8080 description: REST adapter for GitLab API — hooks. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/api/v4/hooks name: api-v4-hooks description: REST surface for api-v4-hooks. operations: - method: GET name: getapiv4hooks description: List system hooks call: gitlab-ci-hooks.getapiv4hooks with: page: rest.page per_page: rest.per_page outputParameters: - type: object mapping: $. - method: POST name: postapiv4hooks description: Add new system hook call: gitlab-ci-hooks.postapiv4hooks with: postApiV4Hooks: rest.postApiV4Hooks outputParameters: - type: object mapping: $. - path: /v1/api/v4/hooks/{hook-id} name: api-v4-hooks-hook-id description: REST surface for api-v4-hooks-hook_id. operations: - method: GET name: getapiv4hookshookid description: Get system hook call: gitlab-ci-hooks.getapiv4hookshookid with: hook_id: rest.hook_id outputParameters: - type: object mapping: $. - method: PUT name: putapiv4hookshookid description: Edit system hook call: gitlab-ci-hooks.putapiv4hookshookid with: hook_id: rest.hook_id putApiV4HooksHookId: rest.putApiV4HooksHookId outputParameters: - type: object mapping: $. - method: POST name: postapiv4hookshookid description: Test a hook call: gitlab-ci-hooks.postapiv4hookshookid with: hook_id: rest.hook_id outputParameters: - type: object mapping: $. - method: DELETE name: deleteapiv4hookshookid description: Delete system hook call: gitlab-ci-hooks.deleteapiv4hookshookid with: hook_id: rest.hook_id outputParameters: - type: object mapping: $. - path: /v1/api/v4/hooks/{hook-id}/custom-headers/{key} name: api-v4-hooks-hook-id-custom-headers-key description: REST surface for api-v4-hooks-hook_id-custom_headers-key. operations: - method: PUT name: putapiv4hookshookidcustomheaderskey description: Set a custom header call: gitlab-ci-hooks.putapiv4hookshookidcustomheaderskey with: hook_id: rest.hook_id key: rest.key putApiV4HooksHookIdCustomHeadersKey: rest.putApiV4HooksHookIdCustomHeadersKey outputParameters: - type: object mapping: $. - method: DELETE name: deleteapiv4hookshookidcustomheaderskey description: Un-Set a custom header call: gitlab-ci-hooks.deleteapiv4hookshookidcustomheaderskey with: hook_id: rest.hook_id key: rest.key outputParameters: - type: object mapping: $. - path: /v1/api/v4/hooks/{hook-id}/url-variables/{key} name: api-v4-hooks-hook-id-url-variables-key description: REST surface for api-v4-hooks-hook_id-url_variables-key. operations: - method: PUT name: putapiv4hookshookidurlvariableskey description: Set a url variable call: gitlab-ci-hooks.putapiv4hookshookidurlvariableskey with: hook_id: rest.hook_id key: rest.key putApiV4HooksHookIdUrlVariablesKey: rest.putApiV4HooksHookIdUrlVariablesKey outputParameters: - type: object mapping: $. - method: DELETE name: deleteapiv4hookshookidurlvariableskey description: Un-Set a url variable call: gitlab-ci-hooks.deleteapiv4hookshookidurlvariableskey with: hook_id: rest.hook_id key: rest.key outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/hooks name: api-v4-projects-id-hooks description: REST surface for api-v4-projects-id-hooks. operations: - method: GET name: getapiv4projectsidhooks description: List project hooks call: gitlab-ci-hooks.getapiv4projectsidhooks with: id: rest.id page: rest.page per_page: rest.per_page outputParameters: - type: object mapping: $. - method: POST name: postapiv4projectsidhooks description: Add project hook call: gitlab-ci-hooks.postapiv4projectsidhooks with: id: rest.id postApiV4ProjectsIdHooks: rest.postApiV4ProjectsIdHooks outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/hooks/{hook-id} name: api-v4-projects-id-hooks-hook-id description: REST surface for api-v4-projects-id-hooks-hook_id. operations: - method: GET name: getapiv4projectsidhookshookid description: Get project hook call: gitlab-ci-hooks.getapiv4projectsidhookshookid with: id: rest.id hook_id: rest.hook_id outputParameters: - type: object mapping: $. - method: PUT name: putapiv4projectsidhookshookid description: Edit project hook call: gitlab-ci-hooks.putapiv4projectsidhookshookid with: id: rest.id hook_id: rest.hook_id putApiV4ProjectsIdHooksHookId: rest.putApiV4ProjectsIdHooksHookId outputParameters: - type: object mapping: $. - method: DELETE name: deleteapiv4projectsidhookshookid description: Delete a project hook call: gitlab-ci-hooks.deleteapiv4projectsidhookshookid with: id: rest.id hook_id: rest.hook_id outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/hooks/{hook-id}/custom-headers/{key} name: api-v4-projects-id-hooks-hook-id-custom-headers-key description: REST surface for api-v4-projects-id-hooks-hook_id-custom_headers-key. operations: - method: PUT name: putapiv4projectsidhookshookidcustomheaderskey description: Set a custom header call: gitlab-ci-hooks.putapiv4projectsidhookshookidcustomheaderskey with: hook_id: rest.hook_id key: rest.key id: rest.id putApiV4ProjectsIdHooksHookIdCustomHeadersKey: rest.putApiV4ProjectsIdHooksHookIdCustomHeadersKey outputParameters: - type: object mapping: $. - method: DELETE name: deleteapiv4projectsidhookshookidcustomheaderskey description: Un-Set a custom header call: gitlab-ci-hooks.deleteapiv4projectsidhookshookidcustomheaderskey with: hook_id: rest.hook_id key: rest.key id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/hooks/{hook-id}/events name: api-v4-projects-id-hooks-hook-id-events description: REST surface for api-v4-projects-id-hooks-hook_id-events. operations: - method: GET name: getapiv4projectsidhookshookidevents description: Get events for a given hook id call: gitlab-ci-hooks.getapiv4projectsidhookshookidevents with: status: rest.status per_page: rest.per_page page: rest.page id: rest.id hook_id: rest.hook_id outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/hooks/{hook-id}/events/{hook-log-id}/resend name: api-v4-projects-id-hooks-hook-id-events-hook-log-id-resend description: REST surface for api-v4-projects-id-hooks-hook_id-events-hook_log_id-resend. operations: - method: POST name: postapiv4projectsidhookshookideventshooklogidresend description: Resend a webhook event call: gitlab-ci-hooks.postapiv4projectsidhookshookideventshooklogidresend with: id: rest.id hook_id: rest.hook_id hook_log_id: rest.hook_log_id outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/hooks/{hook-id}/test/{trigger} name: api-v4-projects-id-hooks-hook-id-test-trigger description: REST surface for api-v4-projects-id-hooks-hook_id-test-trigger. operations: - method: POST name: postapiv4projectsidhookshookidtesttrigger description: Triggers a hook test call: gitlab-ci-hooks.postapiv4projectsidhookshookidtesttrigger with: hook_id: rest.hook_id trigger: rest.trigger id: rest.id outputParameters: - type: object mapping: $. - path: /v1/api/v4/projects/{id}/hooks/{hook-id}/url-variables/{key} name: api-v4-projects-id-hooks-hook-id-url-variables-key description: REST surface for api-v4-projects-id-hooks-hook_id-url_variables-key. operations: - method: PUT name: putapiv4projectsidhookshookidurlvariableskey description: Set a url variable call: gitlab-ci-hooks.putapiv4projectsidhookshookidurlvariableskey with: hook_id: rest.hook_id key: rest.key id: rest.id putApiV4ProjectsIdHooksHookIdUrlVariablesKey: rest.putApiV4ProjectsIdHooksHookIdUrlVariablesKey outputParameters: - type: object mapping: $. - method: DELETE name: deleteapiv4projectsidhookshookidurlvariableskey description: Un-Set a url variable call: gitlab-ci-hooks.deleteapiv4projectsidhookshookidurlvariableskey with: hook_id: rest.hook_id key: rest.key id: rest.id outputParameters: - type: object mapping: $. - type: mcp namespace: gitlab-ci-hooks-mcp port: 9090 transport: http description: MCP adapter for GitLab API — hooks. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-system-hooks description: List system hooks hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-hooks.getapiv4hooks with: page: tools.page per_page: tools.per_page outputParameters: - type: object mapping: $. - name: add-new-system-hook description: Add new system hook hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-hooks.postapiv4hooks with: postApiV4Hooks: tools.postApiV4Hooks outputParameters: - type: object mapping: $. - name: get-system-hook description: Get system hook hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-hooks.getapiv4hookshookid with: hook_id: tools.hook_id outputParameters: - type: object mapping: $. - name: edit-system-hook description: Edit system hook hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-hooks.putapiv4hookshookid with: hook_id: tools.hook_id putApiV4HooksHookId: tools.putApiV4HooksHookId outputParameters: - type: object mapping: $. - name: test-hook description: Test a hook hints: readOnly: true destructive: false idempotent: false call: gitlab-ci-hooks.postapiv4hookshookid with: hook_id: tools.hook_id outputParameters: - type: object mapping: $. - name: delete-system-hook description: Delete system hook hints: readOnly: false destructive: true idempotent: true call: gitlab-ci-hooks.deleteapiv4hookshookid with: hook_id: tools.hook_id outputParameters: - type: object mapping: $. - name: set-custom-header description: Set a custom header hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-hooks.putapiv4hookshookidcustomheaderskey with: hook_id: tools.hook_id key: tools.key putApiV4HooksHookIdCustomHeadersKey: tools.putApiV4HooksHookIdCustomHeadersKey outputParameters: - type: object mapping: $. - name: un-set-custom-header description: Un-Set a custom header hints: readOnly: false destructive: true idempotent: true call: gitlab-ci-hooks.deleteapiv4hookshookidcustomheaderskey with: hook_id: tools.hook_id key: tools.key outputParameters: - type: object mapping: $. - name: set-url-variable description: Set a url variable hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-hooks.putapiv4hookshookidurlvariableskey with: hook_id: tools.hook_id key: tools.key putApiV4HooksHookIdUrlVariablesKey: tools.putApiV4HooksHookIdUrlVariablesKey outputParameters: - type: object mapping: $. - name: un-set-url-variable description: Un-Set a url variable hints: readOnly: false destructive: true idempotent: true call: gitlab-ci-hooks.deleteapiv4hookshookidurlvariableskey with: hook_id: tools.hook_id key: tools.key outputParameters: - type: object mapping: $. - name: list-project-hooks description: List project hooks hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-hooks.getapiv4projectsidhooks with: id: tools.id page: tools.page per_page: tools.per_page outputParameters: - type: object mapping: $. - name: add-project-hook description: Add project hook hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-hooks.postapiv4projectsidhooks with: id: tools.id postApiV4ProjectsIdHooks: tools.postApiV4ProjectsIdHooks outputParameters: - type: object mapping: $. - name: get-project-hook description: Get project hook hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-hooks.getapiv4projectsidhookshookid with: id: tools.id hook_id: tools.hook_id outputParameters: - type: object mapping: $. - name: edit-project-hook description: Edit project hook hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-hooks.putapiv4projectsidhookshookid with: id: tools.id hook_id: tools.hook_id putApiV4ProjectsIdHooksHookId: tools.putApiV4ProjectsIdHooksHookId outputParameters: - type: object mapping: $. - name: delete-project-hook description: Delete a project hook hints: readOnly: false destructive: true idempotent: true call: gitlab-ci-hooks.deleteapiv4projectsidhookshookid with: id: tools.id hook_id: tools.hook_id outputParameters: - type: object mapping: $. - name: set-custom-header-2 description: Set a custom header hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-hooks.putapiv4projectsidhookshookidcustomheaderskey with: hook_id: tools.hook_id key: tools.key id: tools.id putApiV4ProjectsIdHooksHookIdCustomHeadersKey: tools.putApiV4ProjectsIdHooksHookIdCustomHeadersKey outputParameters: - type: object mapping: $. - name: un-set-custom-header-2 description: Un-Set a custom header hints: readOnly: false destructive: true idempotent: true call: gitlab-ci-hooks.deleteapiv4projectsidhookshookidcustomheaderskey with: hook_id: tools.hook_id key: tools.key id: tools.id outputParameters: - type: object mapping: $. - name: get-events-given-hook-id description: Get events for a given hook id hints: readOnly: true destructive: false idempotent: true call: gitlab-ci-hooks.getapiv4projectsidhookshookidevents with: status: tools.status per_page: tools.per_page page: tools.page id: tools.id hook_id: tools.hook_id outputParameters: - type: object mapping: $. - name: resend-webhook-event description: Resend a webhook event hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-hooks.postapiv4projectsidhookshookideventshooklogidresend with: id: tools.id hook_id: tools.hook_id hook_log_id: tools.hook_log_id outputParameters: - type: object mapping: $. - name: triggers-hook-test description: Triggers a hook test hints: readOnly: false destructive: false idempotent: false call: gitlab-ci-hooks.postapiv4projectsidhookshookidtesttrigger with: hook_id: tools.hook_id trigger: tools.trigger id: tools.id outputParameters: - type: object mapping: $. - name: set-url-variable-2 description: Set a url variable hints: readOnly: false destructive: false idempotent: true call: gitlab-ci-hooks.putapiv4projectsidhookshookidurlvariableskey with: hook_id: tools.hook_id key: tools.key id: tools.id putApiV4ProjectsIdHooksHookIdUrlVariablesKey: tools.putApiV4ProjectsIdHooksHookIdUrlVariablesKey outputParameters: - type: object mapping: $. - name: un-set-url-variable-2 description: Un-Set a url variable hints: readOnly: false destructive: true idempotent: true call: gitlab-ci-hooks.deleteapiv4projectsidhookshookidurlvariableskey with: hook_id: tools.hook_id key: tools.key id: tools.id outputParameters: - type: object mapping: $.