Skip to main content
Glama
aaronsb

Confluence MCP Server

update_confluence_page

Modify existing Confluence pages by updating titles, content, and version numbers to maintain current documentation.

Instructions

Update an existing page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesID of the page to update
titleYesNew title of the page
contentYesNew content in Confluence storage format
versionYesCurrent version number of the page

Implementation Reference

  • MCP tool handler: validates parameters, calls ConfluenceClient.updateConfluencePage, formats and returns the updated page metadata as JSON.
    export async function handleUpdateConfluencePage(
      client: ConfluenceClient,
      args: { pageId: string; title: string; content: string; version: number }
    ): Promise<{
      content: Array<{ type: "text"; text: string }>;
    }> {
      try {
        if (!args.pageId || !args.title || !args.content || args.version === undefined) {
          throw new McpError(
            ErrorCode.InvalidParams,
            "pageId, title, content, and version are required"
          );
        }
    
        const page = await client.updateConfluencePage(
          args.pageId,
          args.title,
          args.content,
          args.version
        );
    
        const simplified = {
          id: page.id,
          version: page.version.number,
          url: page._links.webui
        };
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(simplified),
            },
          ],
        };
      } catch (error) {
        console.error("Error updating page:", error instanceof Error ? error.message : String(error));
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to update page: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • Input schema definition for the update_confluence_page tool, specifying parameters pageId, title, content, version as required.
    update_confluence_page: {
      description: "Update an existing page",
      inputSchema: {
        type: "object",
        properties: {
          pageId: {
            type: "string",
            description: "ID of the page to update",
          },
          title: {
            type: "string",
            description: "New title of the page",
          },
          content: {
            type: "string",
            description: "New content in Confluence storage format",
          },
          version: {
            type: "number",
            description: "Current version number of the page",
          },
        },
        required: ["pageId", "title", "content", "version"],
      },
    },
  • src/index.ts:236-247 (registration)
    Tool registration in MCP server's CallToolRequestHandler switch statement, dispatching to handleUpdateConfluencePage.
    case "update_confluence_page": {
      const { pageId, title, content, version } = (args || {}) as {
        pageId: string;
        title: string;
        content: string;
        version: number;
      };
      if (!pageId || !title || !content || version === undefined) {
        throw new McpError(ErrorCode.InvalidParams, "pageId, title, content, and version are required");
      }
      return await handleUpdateConfluencePage(this.confluenceClient, { pageId, title, content, version });
    }
  • ConfluenceClient helper: constructs PUT request body and calls Confluence v2 API to update the specified page.
    async updateConfluencePage(pageId: string, title: string, content: string, version: number): Promise<Page> {
      const body = {
        id: pageId,
        status: 'current',
        title,
        body: {
          representation: 'storage',
          value: content
        },
        version: {
          number: version + 1,
          message: `Updated via MCP at ${new Date().toISOString()}`
        }
      };
    
      const response = await this.v2Client.put(`/pages/${pageId}`, body);
      return response.data;
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Update an existing page' implies a mutation operation but reveals nothing about permissions required, whether changes are reversible, rate limits, concurrency handling (version parameter), or what happens on success/failure. For a write tool with zero annotation coverage, this is a significant gap in transparency.

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 ('Update an existing page'), making it immediately scannable. Every word earns its place by conveying essential purpose without redundancy.

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 mutation tool with 4 required parameters, no annotations, and no output schema, the description is inadequate. It doesn't cover behavioral aspects (permissions, side effects), provide usage context, or explain return values. The agent would struggle to use this tool correctly without additional context beyond the basic schema.

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 100%, so all parameters are documented in the schema. The description adds no additional meaning about parameters beyond implying they're needed for updating. It doesn't explain why 'version' is required (for optimistic concurrency) or clarify 'content' format beyond what the schema states. Baseline 3 is appropriate when schema does the heavy lifting.

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 'Update an existing page' clearly states the verb (update) and resource (page), making the purpose immediately understandable. It distinguishes from siblings like 'create_confluence_page' (new vs existing) and 'get_confluence_page' (read vs write). However, it doesn't specify what aspects are updated (title/content), which keeps it from a perfect score.

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 the page ID and version), when not to use it (e.g., for creating new pages), or how it differs from similar tools like 'create_confluence_page' beyond the obvious 'existing' vs 'new'. This leaves 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

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/aaronsb/confluence-cloud-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server