Skip to main content
Glama

get_project_wiki_page

Retrieve a specific wiki page for a GitLab project by providing project ID, slug, and optional version. Supports rendering in HTML format for enhanced readability and integration.

Instructions

Get a specific wiki page for a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idNo
render_htmlNo
slugNo
versionNo

Implementation Reference

  • Handler logic in the central tool dispatcher switch statement. Parses arguments, calls the GitLab API helper, formats response.
    case "get_project_wiki_page": {
      const args = GetProjectWikiPageSchema.parse(request.params.arguments);
      const wikiPage = await gitlabApi.getProjectWikiPage(args.project_id, args.slug, {
        render_html: args.render_html,
        version: args.version
      });
      return formatWikiPageResponse(wikiPage);
    }
  • Zod schema defining input parameters for the tool: project_id, slug, optional render_html and version.
    export const GetProjectWikiPageSchema = z.object({
      project_id: z.string(),
      slug: z.string(),
      render_html: z.boolean().optional(),
      version: z.string().optional()
    });
  • src/index.ts:199-204 (registration)
    Tool registration in the ALL_TOOLS array, including name, description, input schema, and readOnly flag.
    {
      name: "get_project_wiki_page",
      description: "Get a specific wiki page for a GitLab project",
      inputSchema: createJsonSchema(GetProjectWikiPageSchema),
      readOnly: true
    },
  • Core implementation in GitLabApi class: constructs API URL for project wiki page, adds query params, fetches from GitLab API, parses and validates response.
    async getProjectWikiPage(
      projectId: string,
      slug: string,
      options: {
        render_html?: boolean;
        version?: string;
      } = {}
    ): Promise<GitLabWikiPage> {
      const url = new URL(
        `${this.apiUrl}/projects/${encodeURIComponent(projectId)}/wikis/${encodeURIComponent(slug)}`
      );
    
      // Add query parameters
      if (options.render_html) {
        url.searchParams.append("render_html", "true");
      }
      if (options.version) {
        url.searchParams.append("version", options.version);
      }
    
      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 wikiPage = await response.json();
    
      // Validate and return the response
      return GitLabWikiPageSchema.parse(wikiPage);
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves a wiki page but lacks details on permissions required, rate limits, error conditions, or response format. This leaves significant gaps for a tool that likely involves API calls and access control.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, direct sentence with no wasted words. It is appropriately sized and front-loaded, making it easy to parse quickly without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a GitLab API tool with 4 parameters, no annotations, and no output schema, the description is incomplete. It fails to address key aspects like parameter usage, behavioral traits, or output expectations, making it inadequate for effective tool selection and invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate by explaining parameters. It mentions 'a specific wiki page' but does not clarify what 'project_id', 'slug', 'render_html', or 'version' mean or how they interact. This leaves all four parameters semantically undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Get') and resource ('a specific wiki page for a GitLab project'), making the purpose understandable. However, it does not explicitly differentiate from sibling tools like 'get_group_wiki_page' or 'list_project_wiki_pages', which would be needed for a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it does not mention when to choose this over 'list_project_wiki_pages' for browsing or 'get_group_wiki_page' for group-level access, leaving usage context implied at best.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related Tools

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