Skip to main content
Glama

update_page

Modify and refresh Confluence pages by updating their title, content, and version number through the MCP server, ensuring accurate and synchronized page revisions.

Instructions

Update an existing Confluence page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYesNew page content
pageIdYesPage ID to update
titleYesNew page title
versionYesCurrent version number (required for updates)

Implementation Reference

  • Core implementation of page update logic: fetches current page for validation, constructs UpdatePageRequest, and performs PUT request to Confluence API
    async updatePage( pageId: string, title: string, content: string, version: number ): Promise<ConfluencePage> { const currentPage = await this.getPage(pageId); if (!currentPage.space || !currentPage.space.key) { throw new Error('Unable to determine page space for access validation'); } if (!validateSpaceAccess(currentPage.space.key, this.config.allowedSpaces)) { throw new Error(`Access denied to space: ${currentPage.space.key}`); } const updateData: UpdatePageRequest = { id: pageId, status: 'current', title, type: 'page', version: { number: version }, body: { storage: { value: content, representation: 'storage' } } }; const response: AxiosResponse<ConfluencePage> = await this.client.put(`/pages/${pageId}`, updateData); return response.data; }
  • MCP server tool handler for 'update_page': extracts parameters from request and calls ConfluenceClient.updatePage
    case 'update_page': { const { pageId, title, content, version } = args as { pageId: string; title: string; content: string; version: number; }; const page = await confluenceClient.updatePage(pageId, title, content, version); return { content: [ { type: 'text', text: JSON.stringify(page, null, 2) } ] }; }
  • src/index.ts:115-139 (registration)
    Tool registration in ListTools handler, including name, description, and input schema
    name: 'update_page', description: 'Update an existing Confluence page', inputSchema: { type: 'object', properties: { pageId: { type: 'string', description: 'Page ID to update' }, title: { type: 'string', description: 'New page title' }, content: { type: 'string', description: 'New page content' }, version: { type: 'number', description: 'Current version number (required for updates)' } }, required: ['pageId', 'title', 'content', 'version'] } },
  • TypeScript interface defining the structure of data sent to Confluence update API
    export interface UpdatePageRequest { id: string; status: string; title: string; type: string; version: { number: number; }; body: { storage: { value: string; representation: string; }; }; }

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

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