Skip to main content
Glama

edit_group_wiki_page

Update and manage GitLab group wiki pages by modifying content, title, format, and slug. Supports markdown, rdoc, asciidoc, and org formats for enhanced collaboration.

Instructions

Edit an existing wiki page for a GitLab group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNo
formatNo
group_idNo
slugNo
titleNo

Implementation Reference

  • Core handler function in GitLabApi class that executes the PUT request to the GitLab API endpoint for editing a group wiki page.
    async editGroupWikiPage( groupId: string, slug: string, options: { title?: string; content?: string; format?: WikiPageFormat; } ): Promise<GitLabWikiPage> { const response = await fetch( `${this.apiUrl}/groups/${encodeURIComponent(groupId)}/wikis/${encodeURIComponent(slug)}`, { method: "PUT", headers: { Authorization: `Bearer ${this.token}`, "Content-Type": "application/json", }, body: JSON.stringify({ title: options.title, content: options.content, format: options.format, }), } ); 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 schema defining the input validation for the tool: requires group_id and slug, optional title, content, and format.
    export const EditGroupWikiPageSchema = z.object({ group_id: z.string(), slug: z.string(), title: z.string().optional(), content: z.string().optional(), format: WikiPageFormatEnum.optional() });
  • src/index.ts:249-252 (registration)
    Tool registration in ALL_TOOLS array, defining name, description, input schema, and read-only status for listTools.
    name: "edit_group_wiki_page", description: "Edit an existing wiki page for a GitLab group", inputSchema: createJsonSchema(EditGroupWikiPageSchema), readOnly: false
  • Dispatch handler in the main CallToolRequest switch statement that parses args and calls the GitLabApi.editGroupWikiPage method.
    case "edit_group_wiki_page": { const args = EditGroupWikiPageSchema.parse(request.params.arguments); const wikiPage = await gitlabApi.editGroupWikiPage(args.group_id, args.slug, { title: args.title, content: args.content, format: args.format }); 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