Skip to main content
Glama

list_group_wiki_pages

Retrieve all wiki pages for a GitLab group, optionally including content, to organize and manage group knowledge resources efficiently.

Instructions

List all wiki pages for a GitLab group

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
group_idNo
with_contentNo

Implementation Reference

  • Core handler function in GitLabApi class that lists wiki pages for a group by calling the GitLab API.
    async listGroupWikiPages(
      groupId: string,
      options: {
        with_content?: boolean;
      } = {}
    ): Promise<GitLabWikiPagesResponse> {
      const url = new URL(
        `${this.apiUrl}/groups/${encodeURIComponent(groupId)}/wikis`
      );
    
      // Add query parameters
      if (options.with_content) {
        url.searchParams.append("with_content", "true");
      }
    
      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 wikiPages = await response.json() as any[];
    
      // Validate and return the response
      return GitLabWikiPagesResponseSchema.parse({
        count: wikiPages.length,
        items: wikiPages,
      });
    }
  • Zod schema defining the input parameters for the tool: group_id (required) and with_content (optional).
    export const ListGroupWikiPagesSchema = z.object({
      group_id: z.string(),
      with_content: z.boolean().optional()
    });
  • src/index.ts:231-235 (registration)
    Tool registration in the ALL_TOOLS array, defining name, description, input schema, and read-only status.
      name: "list_group_wiki_pages",
      description: "List all wiki pages for a GitLab group",
      inputSchema: createJsonSchema(ListGroupWikiPagesSchema),
      readOnly: true
    },
  • MCP server handler case that parses input, calls the GitLab API method, and formats the response.
    case "list_group_wiki_pages": {
      const args = ListGroupWikiPagesSchema.parse(request.params.arguments);
      const wikiPages = await gitlabApi.listGroupWikiPages(args.group_id, {
        with_content: args.with_content
      });
      return formatWikiPagesResponse(wikiPages);
    }

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