Skip to main content
Glama
ttpears

GitLab MCP Server

by ttpears

List Broadcast Messages

list_broadcast_messages
Read-onlyIdempotent

Retrieve all GitLab broadcast messages to view instance-wide announcements. Supports pagination and optional credentials.

Instructions

List all GitLab broadcast messages (instance-wide announcements). Read-only.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (1-based)
perPageNoResults per page
userCredentialsNoYour GitLab credentials (optional — falls back to the configured env token if not provided)

Implementation Reference

  • The Tool definition for 'list_broadcast_messages' — it accepts pagination params (page, perPage) and delegates to client.listBroadcastMessages.
    const listBroadcastMessagesTool: Tool = {
      name: 'list_broadcast_messages',
      title: 'List Broadcast Messages',
      description: 'List all GitLab broadcast messages (instance-wide announcements). Read-only.',
      requiresAuth: false,
      requiresWrite: false,
      annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true },
      inputSchema: withUserAuth(z.object({
        page: z.number().int().min(1).default(1).describe('Page number (1-based)'),
        perPage: z.number().int().min(1).max(100).default(20).describe('Results per page'),
      })),
      handler: async (input, client, userConfig) => {
        const credentials = input.userCredentials ? validateUserConfig(input.userCredentials) : userConfig;
        return client.listBroadcastMessages(input.page, input.perPage, credentials);
      },
    };
  • Input schema for list_broadcast_messages: page (default 1) and perPage (default 20, max 100), wrapped with optional user auth.
    inputSchema: withUserAuth(z.object({
      page: z.number().int().min(1).default(1).describe('Page number (1-based)'),
      perPage: z.number().int().min(1).max(100).default(20).describe('Results per page'),
    })),
  • src/tools.ts:2290-2291 (registration)
    Tool registered in the readOnlyTools array, making it available as a read-only tool.
    listBroadcastMessagesTool,
    getBroadcastMessageTool,
  • The client method that performs the REST API call to GitLab's GET /api/v4/broadcast_messages, using the restRequest helper.
    async listBroadcastMessages(page = 1, perPage = 20, userConfig?: UserConfig): Promise<any> {
      return this.restRequest('GET', '/broadcast_messages', {
        query: { page, per_page: Math.min(perPage, this.config.maxPageSize) },
        userConfig,
      });
    }
Behavior3/5

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

Annotations already declare readOnlyHint, destructiveHint, and idempotentHint. The description adds 'Read-only' and 'instance-wide announcements', which provide slight additional context but are minimal beyond the annotations.

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 a single, front-loaded sentence with no wasted words. Every part is essential: verb, resource, scope, and read-only nature.

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 rich annotations and complete input schema, the description is adequate for a simple list operation. However, it could mention pagination support, though the schema already documents page and perPage.

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?

Schema description coverage is 100%, so the description does not need to explain parameters. The description itself adds no parameter-specific information, meeting the baseline expected for full schema coverage.

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 'List' and the resource 'all GitLab broadcast messages (instance-wide announcements)', distinguishing it from CRUD siblings like create, update, delete.

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 lacks explicit guidance on when to use this tool versus alternatives such as create_broadcast_message or update_broadcast_message, though the read-only annotation implicitly suggests it for listing only.

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