Skip to main content
Glama

get_group_wiki_page

Retrieve a specific wiki page for a GitLab group, with options to render HTML content and specify the version, using input parameters like group ID and page slug.

Instructions

Get a specific wiki page for a GitLab group

Input Schema

NameRequiredDescriptionDefault
group_idNo
render_htmlNo
slugNo
versionNo

Input Schema (JSON Schema)

{ "properties": { "group_id": { "type": "string" }, "render_html": { "type": "boolean" }, "slug": { "type": "string" }, "version": { "type": "string" } }, "type": "object" }

Implementation Reference

  • Core implementation of the getGroupWikiPage function in GitLabApi class. Fetches a specific wiki page from a GitLab group via API GET request to /groups/{groupId}/wikis/{slug}, with optional render_html and version params. Parses response with GitLabWikiPageSchema.
    async getGroupWikiPage( groupId: string, slug: string, options: { render_html?: boolean; version?: string; } = {} ): Promise<GitLabWikiPage> { const url = new URL( `${this.apiUrl}/groups/${encodeURIComponent(groupId)}/wikis/${encodeURIComponent(slug)}` ); // Add query parameters if (options.render_html) { url.searchParams.append("render_html", "true"); } if (options.version) { url.searchParams.append("version", options.version); } const response = await fetch(url.toString(), { headers: { Authorization: `Bearer ${this.token}`, }, }); if (!response.ok) { throw new McpError( ErrorCode.InternalError, `GitLab API error: ${response.statusText}` ); } // Parse the response JSON const wikiPage = await response.json(); // Validate and return the response return GitLabWikiPageSchema.parse(wikiPage); }
  • Zod input schema for get_group_wiki_page tool, defining required group_id and slug, optional render_html and version.
    export const GetGroupWikiPageSchema = z.object({ group_id: z.string(), slug: z.string(), render_html: z.boolean().optional(), version: z.string().optional() });
  • src/index.ts:236-240 (registration)
    Tool registration in ALL_TOOLS array, defining name, description, inputSchema from GetGroupWikiPageSchema, marked readOnly.
    { name: "get_group_wiki_page", description: "Get a specific wiki page for a GitLab group", inputSchema: createJsonSchema(GetGroupWikiPageSchema), readOnly: true
  • Dispatch handler in main switch statement: parses args with schema, calls gitlabApi.getGroupWikiPage, formats response with formatWikiPageResponse.
    case "get_group_wiki_page": { const args = GetGroupWikiPageSchema.parse(request.params.arguments); const wikiPage = await gitlabApi.getGroupWikiPage(args.group_id, args.slug, { render_html: args.render_html, version: args.version }); return formatWikiPageResponse(wikiPage); }

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/yoda-digital/mcp-gitlab-server'

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