Skip to main content
Glama

edit_project_wiki_page

Modify an existing GitLab project wiki page by updating content, title, format, or slug. Use this tool to maintain accurate and up-to-date project documentation efficiently.

Instructions

Edit an existing wiki page for a GitLab project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentNo
formatNo
project_idNo
slugNo
titleNo

Implementation Reference

  • Core handler function that sends a PUT request to the GitLab API to edit the specified project wiki page.
    async editProjectWikiPage(
      projectId: string,
      slug: string,
      options: {
        title?: string;
        content?: string;
        format?: WikiPageFormat;
      }
    ): Promise<GitLabWikiPage> {
      const response = await fetch(
        `${this.apiUrl}/projects/${encodeURIComponent(projectId)}/wikis/${encodeURIComponent(slug)}`,
        {
          method: "PUT",
          headers: {
            Authorization: `Bearer ${this.token}`,
            "Content-Type": "application/json",
          },
          body: JSON.stringify({
            title: options.title,
            content: options.content,
            format: options.format,
          }),
        }
      );
    
      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 schema defining the input parameters for the edit_project_wiki_page tool.
    export const EditProjectWikiPageSchema = z.object({
      project_id: z.string(),
      slug: z.string(),
      title: z.string().optional(),
      content: z.string().optional(),
      format: WikiPageFormatEnum.optional()
    });
  • src/index.ts:211-216 (registration)
    Tool registration in the ALL_TOOLS array, defining name, description, input schema, and read-only status.
    {
      name: "edit_project_wiki_page",
      description: "Edit an existing wiki page for a GitLab project",
      inputSchema: createJsonSchema(EditProjectWikiPageSchema),
      readOnly: false
    },
  • Dispatch handler in the main CallToolRequest switch that parses args and calls the GitLab API method.
    case "edit_project_wiki_page": {
      const args = EditProjectWikiPageSchema.parse(request.params.arguments);
      const wikiPage = await gitlabApi.editProjectWikiPage(args.project_id, args.slug, {
        title: args.title,
        content: args.content,
        format: args.format
      });
      return formatWikiPageResponse(wikiPage);
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Edit' implies a mutation operation, but lacks details on permissions required, whether changes are reversible, error handling, or rate limits. This is a significant gap for a tool that modifies data without structured safety hints.

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 that directly states the tool's purpose without unnecessary words. It's front-loaded and wastes no space, 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?

Given the complexity (5 parameters, mutation operation, no annotations, no output schema), the description is incomplete. It doesn't explain what the tool returns, error conditions, or how parameters interact, which is inadequate for safe and effective use by an AI agent.

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%, and the description provides no information about parameters. With 5 parameters (project_id, slug, title, content, format) and no schema descriptions, the agent must rely solely on property names and the enum for 'format', leaving semantics unclear for critical inputs like 'slug' or required fields.

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 ('Edit') and resource ('an existing wiki page for a GitLab project'), which is specific and unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'edit_group_wiki_page' or 'create_project_wiki_page', though the context implies project vs. group scope.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., needing an existing page), exclusions, or comparisons to similar tools like 'create_project_wiki_page' or 'edit_group_wiki_page', leaving the agent to infer usage from context alone.

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