Skip to main content
Glama
ttpears

GitLab MCP Server

by ttpears

Delete Broadcast Message

delete_broadcast_message
DestructiveIdempotent

Delete a broadcast message from GitLab using its ID. Requires administrator privileges for access.

Instructions

Delete a GitLab broadcast message by ID. Requires administrator privileges.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesBroadcast message ID
userCredentialsNoYour GitLab credentials (optional — falls back to the configured env token if not provided)

Implementation Reference

  • The Tool definition and handler for 'delete_broadcast_message'. It takes an id, authenticates, calls client.deleteBroadcastMessage, and returns a success object.
    const deleteBroadcastMessageTool: Tool = {
      name: 'delete_broadcast_message',
      title: 'Delete Broadcast Message',
      description: 'Delete a GitLab broadcast message by ID. Requires administrator privileges.',
      requiresAuth: true,
      requiresWrite: true,
      annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: true },
      inputSchema: withUserAuth(z.object({
        id: z.number().int().describe('Broadcast message ID'),
      })),
      handler: async (input, client, userConfig) => {
        const credentials = input.userCredentials ? validateUserConfig(input.userCredentials) : userConfig;
        if (!credentials) {
          throw new Error('User authentication is required for deleting broadcast messages.');
        }
        await client.deleteBroadcastMessage(input.id, credentials);
        return { id: input.id, deleted: true };
      },
    };
  • Input schema for delete_broadcast_message: requires an integer 'id' field.
    inputSchema: withUserAuth(z.object({
      id: z.number().int().describe('Broadcast message ID'),
    })),
  • src/tools.ts:2307-2317 (registration)
    deleteBroadcastMessageTool is registered in the writeTools array, which is exported and included in the main tools list.
    export const writeTools: Tool[] = [
      createIssueTool,
      createMergeRequestTool,
      createNoteTool,
      deleteNoteTool,
      updateNoteTool,
      managePipelineTool,
      createBroadcastMessageTool,
      updateBroadcastMessageTool,
      deleteBroadcastMessageTool,
    ];
  • Helper/client method that performs a REST DELETE request to GitLab's /broadcast_messages/:id endpoint.
    async deleteBroadcastMessage(id: number, userConfig?: UserConfig): Promise<any> {
      return this.restRequest('DELETE', `/broadcast_messages/${id}`, { userConfig, requiresWrite: true });
    }
Behavior4/5

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

The description adds the behavioral trait that administrator privileges are required, which is not covered by annotations. Annotations already indicate destructive and idempotent behavior, so the description provides additional useful context beyond the metadata.

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 consists of two concise sentences. The first sentence immediately states the action and the second adds a critical prerequisite. No unnecessary words or information.

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

Completeness4/5

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

Given the simplicity of the tool (delete by ID) and the presence of annotations (destructiveHint, idempotentHint), the description covers the essential purpose and key requirement. It could mention the permanent nature of deletion but is otherwise sufficient.

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 descriptions already cover both parameters ('Broadcast message ID' and credentials). The description does not add any further parameter information. With 100% schema coverage, a score of 3 is appropriate.

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

Purpose5/5

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

The description clearly states the verb 'Delete' and the resource 'GitLab broadcast message' with the method 'by ID'. It distinguishes from sibling tools like create_broadcast_message, update_broadcast_message, list_broadcast_messages, and get_broadcast_message.

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

Usage Guidelines3/5

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

The description mentions the prerequisite 'Requires administrator privileges', but does not explicitly state when to use this tool versus alternatives or when not to use it. The context is clear from the name, but no explicit guidance is given.

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

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/ttpears/gitlab-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server