Get Broadcast Message
get_broadcast_messageRetrieves a specific GitLab broadcast message by its identifier.
Instructions
Get a specific GitLab broadcast message by ID.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Broadcast message ID | |
| userCredentials | No | Your GitLab credentials (optional — falls back to the configured env token if not provided) |
Implementation Reference
- src/tools.ts:1681-1695 (handler)The tool definition and handler for 'get_broadcast_message'. It accepts a broadcast message ID, resolves credentials, and delegates to client.getBroadcastMessage().
const getBroadcastMessageTool: Tool = { name: 'get_broadcast_message', title: 'Get Broadcast Message', description: 'Get a specific GitLab broadcast message by ID.', requiresAuth: false, requiresWrite: false, annotations: { readOnlyHint: true, destructiveHint: false, 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; return client.getBroadcastMessage(input.id, credentials); }, }; - src/tools.ts:1688-1690 (schema)Input schema: requires a numeric 'id' field for the broadcast message ID.
inputSchema: withUserAuth(z.object({ id: z.number().int().describe('Broadcast message ID'), })), - src/tools.ts:2272-2300 (registration)Tool registered in the readOnlyTools array, which is spread into the exported tools array.
export const readOnlyTools: Tool[] = [ getProjectTool, getIssuesTool, getMergeRequestsTool, executeCustomQueryTool, getAvailableQueriesTools, getMergeRequestPipelinesTool, getPipelineJobsTool, getMergeRequestDiffsTool, getMergeRequestCommitsTool, getNotesTool, getIssueContextTool, getMergeRequestContextTool, listMilestonesTool, listIterationsTool, getTimeTrackingTool, getMergeRequestReviewersTool, getProjectStatisticsTool, listBroadcastMessagesTool, getBroadcastMessageTool, getWorkItemTool, listWorkItemsTool, listUserEventsTool, listProjectEventsTool, listMyEventsTool, analyticsUserSummaryTool, analyticsGroupSummaryTool, analyticsReviewBottlenecksTool, ]; - src/gitlab-client.ts:2665-2667 (helper)Client helper that performs the actual REST API call to GitLab's GET /broadcast_messages/:id endpoint via the restRequest method.
async getBroadcastMessage(id: number, userConfig?: UserConfig): Promise<any> { return this.restRequest('GET', `/broadcast_messages/${id}`, { userConfig }); }