Skip to main content
Glama

create_group_wiki_page

Generate a new wiki page for a GitLab group by specifying title, content, format, and group ID. Simplify documentation management within GitLab projects.

Instructions

Create a new wiki page for a GitLab group

Input Schema

NameRequiredDescriptionDefault
contentNo
formatNo
group_idNo
titleNo

Input Schema (JSON Schema)

{ "properties": { "content": { "type": "string" }, "format": { "enum": [ "markdown", "rdoc", "asciidoc", "org" ], "type": "string" }, "group_id": { "type": "string" }, "title": { "type": "string" } }, "type": "object" }

Implementation Reference

  • MCP server tool handler: parses input schema, calls GitLab API helper, and formats response.
    case "create_group_wiki_page": { const args = CreateGroupWikiPageSchema.parse(request.params.arguments); const wikiPage = await gitlabApi.createGroupWikiPage(args.group_id, { title: args.title, content: args.content, format: args.format }); return formatWikiPageResponse(wikiPage); }
  • Zod input schema validation for tool parameters: group_id, title, content, optional format.
    export const CreateGroupWikiPageSchema = z.object({ group_id: z.string(), title: z.string(), content: z.string(), format: WikiPageFormatEnum.optional() });
  • src/index.ts:243-246 (registration)
    Tool registration in ALL_TOOLS: defines name, description, input schema, and read-only flag.
    name: "create_group_wiki_page", description: "Create a new wiki page for a GitLab group", inputSchema: createJsonSchema(CreateGroupWikiPageSchema), readOnly: false
  • GitLab API client method: POST request to /groups/{group_id}/wikis endpoint to create wiki page.
    async createGroupWikiPage( groupId: string, options: { title: string; content: string; format?: WikiPageFormat; } ): Promise<GitLabWikiPage> { const response = await fetch( `${this.apiUrl}/groups/${encodeURIComponent(groupId)}/wikis`, { method: "POST", headers: { Authorization: `Bearer ${this.token}`, "Content-Type": "application/json", }, body: JSON.stringify({ title: options.title, content: options.content, format: options.format || "markdown", }), } ); 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); }

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