Skip to main content
Glama

delete_project_wiki_page

Remove a wiki page from a GitLab project by specifying the project ID and page slug. Ideal for maintaining clean and updated project documentation.

Instructions

Delete a wiki page from a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNo
slugNo

Implementation Reference

  • MCP tool handler in the CallToolRequest switch statement. Parses arguments using the schema and delegates to gitlabApi.deleteProjectWikiPage, then returns success message.
    case "delete_project_wiki_page": {
      const args = DeleteProjectWikiPageSchema.parse(request.params.arguments);
      await gitlabApi.deleteProjectWikiPage(args.project_id, args.slug);
      return { content: [{ type: "text", text: `Wiki page '${args.slug}' has been deleted.` }] };
  • Core implementation function that performs the actual DELETE request to GitLab API to delete the project wiki page.
    async deleteProjectWikiPage(
      projectId: string,
      slug: string
    ): Promise<void> {
      const response = await fetch(
        `${this.apiUrl}/projects/${encodeURIComponent(projectId)}/wikis/${encodeURIComponent(slug)}`,
        {
          method: "DELETE",
          headers: {
            Authorization: `Bearer ${this.token}`,
          },
        }
      );
    
      if (!response.ok) {
        throw new McpError(
          ErrorCode.InternalError,
          `GitLab API error: ${response.statusText}`
        );
      }
    }
  • Zod schema defining input parameters: project_id and slug for the wiki page.
    export const DeleteProjectWikiPageSchema = z.object({
      project_id: z.string(),
      slug: z.string()
    });
  • src/index.ts:218-221 (registration)
    Tool registration in ALL_TOOLS array, defining name, description, input schema, and readOnly flag.
    name: "delete_project_wiki_page",
    description: "Delete a wiki page from a GitLab project",
    inputSchema: createJsonSchema(DeleteProjectWikiPageSchema),
    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