Skip to main content
Glama
KS-GEN-AI

Confluence Communication Server

get_page_content

Retrieve content from Confluence pages using page IDs to access stored documentation and information.

Instructions

Get the content of a Confluence page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageIdYesConfluence Page ID

Implementation Reference

  • Core handler function that retrieves the content of a Confluence page by pageId using the REST API, including 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:59-72 (registration)
    Registers the 'get_page_content' tool in the listTools response, including name, 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'],
      },
    },
  • Defines the input schema for the get_page_content tool, requiring a pageId string.
    inputSchema: {
      type: 'object',
      properties: {
        pageId: {
          type: 'string',
          description: 'Confluence Page ID',
        },
      },
      required: ['pageId'],
    },
  • MCP CallToolRequest handler case for 'get_page_content': validates input, calls getPageContent, and formats response as text content.
    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),
          },
        ],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure but only states the basic action. It doesn't cover aspects like authentication needs, rate limits, error handling, or what the returned content includes (e.g., format, metadata), which are critical for a read operation in a system like Confluence.

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 any wasted words. It's front-loaded and appropriately sized for a simple tool, making it easy for an agent 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 lack of annotations and output schema, the description is incomplete for a tool that retrieves content from a complex system like Confluence. It doesn't explain what the returned content entails (e.g., HTML, text, attachments) or any behavioral nuances, leaving significant gaps for the agent to infer.

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?

The schema description coverage is 100%, with the single parameter 'pageId' fully documented in the schema. The description doesn't add any extra meaning about the parameter beyond what the schema provides, such as how to obtain the pageId or its format, so it meets the baseline for high schema coverage.

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 ('Get') and resource ('content of a Confluence page'), making the purpose immediately understandable. It distinguishes from siblings like 'update_page_content' by specifying retrieval rather than modification, though it doesn't explicitly contrast with 'execute_cql_search' for broader searches.

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 guidance is provided on when to use this tool versus alternatives. While it implies usage for retrieving specific page content, it doesn't mention when to choose this over 'execute_cql_search' for finding pages or 'update_page_content' for editing, leaving the agent without explicit usage context.

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

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