Skip to main content
Glama
Olson3R
by Olson3R

get_page

Retrieve a specific Confluence page by its ID with optional body formats using Confluence MCP Server to access and manage content programmatically.

Instructions

Retrieve a specific Confluence page by ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyFormatNoBody format to include: "storage" or "view" (optional)
pageIdYesConfluence page ID

Implementation Reference

  • MCP tool handler for 'get_page': destructures input arguments, invokes ConfluenceClient.getPage method, serializes the result as JSON, and returns it as text content in the MCP response format.
    case 'get_page': {
      const { pageId, bodyFormat } = args as {
        pageId: string;
        bodyFormat?: string;
      };
      
      const page = await confluenceClient.getPage(pageId, bodyFormat);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(page, null, 2)
          }
        ]
      };
    }
  • src/index.ts:69-87 (registration)
    Tool registration in ListToolsResponse: defines name 'get_page', description, and inputSchema specifying required pageId and optional bodyFormat.
    {
      name: 'get_page',
      description: 'Retrieve a specific Confluence page by ID',
      inputSchema: {
        type: 'object',
        properties: {
          pageId: {
            type: 'string',
            description: 'Confluence page ID'
          },
          bodyFormat: {
            type: 'string',
            description: 'Body format to include: "storage" or "view" (optional)',
            enum: ['storage', 'view']
          }
        },
        required: ['pageId']
      }
    },
  • JSON schema for 'get_page' tool input validation: requires pageId string, optional bodyFormat enum.
    inputSchema: {
      type: 'object',
      properties: {
        pageId: {
          type: 'string',
          description: 'Confluence page ID'
        },
        bodyFormat: {
          type: 'string',
          description: 'Body format to include: "storage" or "view" (optional)',
          enum: ['storage', 'view']
        }
      },
      required: ['pageId']
    }
  • ConfluenceClient.getPage helper method: performs authenticated GET to Confluence v1 API content endpoint with space/version/body expansion, validates allowed space access, returns ConfluencePage.
    async getPage(pageId: string, bodyFormat?: string): Promise<ConfluencePage> {
      // Use v1 API for getPage since we need space information anyway
      let expandParam = 'space,version';
      if (bodyFormat) {
        const format = bodyFormat === 'view' ? 'body.view' : 'body.storage';
        expandParam += `,${format}`;
      }
      
      const v1Url = `${this.config.baseUrl}/wiki/rest/api/content/${pageId}?expand=${expandParam}`;
      const auth = Buffer.from(`${this.config.username}:${this.config.apiToken}`).toString('base64');
      
      const response = await axios.get(v1Url, {
        headers: {
          'Authorization': `Basic ${auth}`,
          'Accept': 'application/json',
          'Content-Type': 'application/json'
        },
        timeout: 30000
      });
      
      // Validate space access
      if (!response.data.space || !response.data.space.key) {
        throw new Error('Unable to determine page space for access validation');
      }
      
      if (!validateSpaceAccess(response.data.space.key, this.config.allowedSpaces)) {
        throw new Error(`Access denied to space: ${response.data.space.key}`);
      }
      
      return response.data;
    }
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 the action ('Retrieve') but lacks details on permissions required, error handling (e.g., invalid page ID), rate limits, or response format. For a read operation 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 that directly states the tool's purpose without unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance, with no wasted information.

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 tool's moderate complexity (retrieving a page with optional formatting), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like authentication needs, potential errors, or what the return value includes (e.g., page content, metadata), leaving gaps for an AI 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?

Schema description coverage is 100%, with clear descriptions for both parameters (pageId and bodyFormat). The description adds no additional parameter semantics beyond what the schema provides, such as examples or edge cases, so it meets the baseline score when the 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 clearly states the verb 'Retrieve' and the resource 'specific Confluence page by ID', making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'get_page_children' or 'search_confluence', which also retrieve Confluence content but with different scopes or methods.

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 a valid page ID), exclusions, or comparisons to siblings like 'get_page_children' (for child pages) or 'search_confluence' (for broader searches), leaving usage context implied at best.

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

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