Skip to main content
Glama

create_project_wiki_page

Automate the creation of a new wiki page for a GitLab project, specifying title, content, format, and project ID to streamline documentation processes.

Instructions

Create a new wiki page for a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNo
formatNo
project_idNo
titleNo

Implementation Reference

  • Primary MCP tool handler: parses arguments using the schema, delegates to GitLabApi.createProjectWikiPage, and returns formatted response.
    case "create_project_wiki_page": {
      const args = CreateProjectWikiPageSchema.parse(request.params.arguments);
      const wikiPage = await gitlabApi.createProjectWikiPage(args.project_id, {
        title: args.title,
        content: args.content,
        format: args.format
      });
      return formatWikiPageResponse(wikiPage);
    }
  • GitLab API client method implementing the wiki page creation via POST to /projects/{projectId}/wikis endpoint.
    async createProjectWikiPage(
      projectId: string,
      options: {
        title: string;
        content: string;
        format?: WikiPageFormat;
      }
    ): Promise<GitLabWikiPage> {
      const response = await fetch(
        `${this.apiUrl}/projects/${encodeURIComponent(projectId)}/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);
    }
  • Zod input schema for the tool defining required parameters: project_id, title, content; optional format.
    export const CreateProjectWikiPageSchema = z.object({
      project_id: z.string(),
      title: z.string(),
      content: z.string(),
      format: WikiPageFormatEnum.optional()
    });
  • src/index.ts:206-209 (registration)
    Tool definition in ALL_TOOLS array used for registration in listTools response and read-only filtering.
    name: "create_project_wiki_page",
    description: "Create a new wiki page for a GitLab project",
    inputSchema: createJsonSchema(CreateProjectWikiPageSchema),
    readOnly: false
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It states it 'creates' (implying a write operation) but doesn't disclose permissions required, whether it overwrites existing pages, rate limits, or what happens on success/failure. This leaves significant gaps for a mutation tool.

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, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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?

For a 4-parameter mutation tool with no annotations and no output schema, the description is incomplete. It lacks details on behavior, parameters, error handling, and output, leaving the agent with insufficient context to use it effectively beyond the basic purpose.

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

Parameters3/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 but adds no parameter information. It doesn't explain what 'project_id', 'title', 'content', or 'format' mean or how they interact. The baseline is 3 since schema coverage is low but description doesn't compensate, though it hints at 'wiki page' context.

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 ('Create') and resource ('new wiki page for a GitLab project'), making the purpose understandable. It distinguishes from siblings like 'create_group_wiki_page' by specifying 'project' scope, but could be more specific about what distinguishes it from 'edit_project_wiki_page' or file creation tools.

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 explicit guidance on when to use this tool versus alternatives is provided. The description doesn't mention prerequisites (e.g., needing project access), when not to use it (e.g., for updating existing pages), or direct alternatives like 'edit_project_wiki_page' or 'create_or_update_file'.

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