Skip to main content
Glama

delete_group_wiki_page

Remove a wiki page from a GitLab group by specifying the group ID and page slug. Simplify wiki management and streamline content updates.

Instructions

Delete a wiki page from a GitLab group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_idNo
slugNo

Implementation Reference

  • Core handler function that executes the DELETE request to the GitLab API to delete a group wiki page.
    async deleteGroupWikiPage(
      groupId: string,
      slug: string
    ): Promise<void> {
      const response = await fetch(
        `${this.apiUrl}/groups/${encodeURIComponent(groupId)}/wikis/${encodeURIComponent(slug)}`,
        {
          method: "DELETE",
          headers: {
            Authorization: `Bearer ${this.token}`,
          },
        }
      );
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `GitLab API error: ${response.statusText}`
        );
      }
    }
  • src/index.ts:657-661 (registration)
    Tool dispatch handler in the main switch statement that parses input and calls the GitLab API method.
    case "delete_group_wiki_page": {
      const args = DeleteGroupWikiPageSchema.parse(request.params.arguments);
      await gitlabApi.deleteGroupWikiPage(args.group_id, args.slug);
      return { content: [{ type: "text", text: `Wiki page '${args.slug}' has been deleted.` }] };
    }
  • Zod schema defining the input parameters: group_id and slug for the tool.
    export const DeleteGroupWikiPageSchema = z.object({
      group_id: z.string(),
      slug: z.string()
    });
  • src/index.ts:255-259 (registration)
    Tool registration in the ALL_TOOLS array, defining name, description, input schema, and read-only status.
      name: "delete_group_wiki_page",
      description: "Delete a wiki page from a GitLab group",
      inputSchema: createJsonSchema(DeleteGroupWikiPageSchema),
      readOnly: false
    },

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