Skip to main content
Glama

gitlab_test_webhook

Validate GitLab webhook functionality by testing specific webhooks within designated projects using project and webhook IDs for accurate integration and workflow verification.

Instructions

Test a webhook

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesThe ID or URL-encoded path of the project
webhook_idYesThe ID of the webhook

Implementation Reference

  • The main handler function implementing the gitlab_test_webhook tool. It extracts parameters, validates required fields, calls the integrationsManager.testWebhook method with optional trigger_type defaulting to 'push_events', and formats the response.
    export const testWebhook: ToolHandler = async (params, context) => {
      const { project_id, webhook_id, trigger_type } = params.arguments || {};
      if (!project_id || !webhook_id) {
        throw new McpError(ErrorCode.InvalidParams, 'project_id and webhook_id are required');
      }
      
      const data = await context.integrationsManager.testWebhook(
        project_id as string | number, 
        webhook_id as number, 
        (trigger_type as string) || 'push_events'
      );
      return formatResponse(data);
    }; 
  • The input schema definition for the gitlab_test_webhook tool, specifying required parameters project_id (string) and webhook_id (number).
      name: 'gitlab_test_webhook',
      description: 'Test a 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']
      }
    },
  • The registration entry in the toolRegistry that maps the tool name 'gitlab_test_webhook' to the testWebhook handler function from integration-handlers.
    gitlab_test_webhook: integrationHandlers.testWebhook,
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Test a webhook' implies an action that might trigger a test event or check functionality, but it doesn't disclose key traits like whether it's read-only or mutative, what the test involves (e.g., sending a sample payload), potential side effects (e.g., generating logs), or error conditions. This is inadequate for a tool with no annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, front-loading the core action and resource. There's no wasted language or redundancy, making it efficient for quick understanding, though it lacks depth.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of testing a webhook (which could involve network calls, event simulation, or validation), no annotations, and no output schema, the description is incomplete. It doesn't explain what the test does, what output to expect (e.g., success/failure status, response details), or behavioral aspects, leaving significant gaps for the agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, with clear documentation for 'project_id' and 'webhook_id'. The description adds no additional meaning beyond the schema, such as explaining how testing works with these parameters. Since schema coverage is high, the baseline score of 3 is appropriate, as the description doesn't compensate but doesn't need to.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Test a webhook' states the action (test) and resource (webhook), which provides a basic purpose. However, it's vague about what 'test' entails (e.g., triggering a test event, checking connectivity) and doesn't distinguish it from sibling tools like 'gitlab_get_webhook' or 'gitlab_update_webhook', which handle different operations on webhooks.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing webhook), context (e.g., after creating or updating a webhook), or exclusions (e.g., not for listing webhooks). This leaves the agent without clear usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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