Skip to main content
Glama
KS-GEN-AI

Confluence Communication Server

get_page_content

Fetch Confluence page content using the Confluence Communication Server by specifying the page ID. Enable quick access to stored information for streamlined workflows.

Instructions

Get the content of a Confluence page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesConfluence Page ID

Implementation Reference

  • Core handler function that fetches the content of a Confluence page by pageId using the REST API, with error handling.
    async function getPageContent(pageId: string): Promise<any> { try { const response = await axios.get( `${CONFLUENCE_URL}/wiki/rest/api/content/${pageId}?expand=body.storage,version`, { headers: getAuthHeaders().headers, }, ); return response.data; } catch (error: any) { return { error: error.response ? error.response.data : error.message, }; } }
  • src/index.ts:60-72 (registration)
    Registration of the 'get_page_content' tool in the listTools response, including description and input schema.
    name: 'get_page_content', description: 'Get the content of a Confluence page', inputSchema: { type: 'object', properties: { pageId: { type: 'string', description: 'Confluence Page ID', }, }, required: ['pageId'], }, },
  • MCP CallToolRequestSchema handler case for 'get_page_content', which validates input and invokes the getPageContent function.
    case 'get_page_content': { const pageId = String(request.params.arguments?.pageId); if (!pageId) { throw new Error('Page ID is required'); } const response = await getPageContent(pageId); return { content: [ { type: 'text', text: JSON.stringify(response, null, 2), }, ], }; }

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/KS-GEN-AI/confluence-mcp-server'

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