Skip to main content
Glama

confluence_get_page_content

Retrieve content from a specific Confluence page using its page ID to access documentation and information stored in Confluence.

Instructions

Get content of a specific Confluence page.

Args: page_id: Page ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
page_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for 'confluence_get_page_content'. Decorated with @mcp.tool(), it delegates to ConfluenceTools.get_page_content.
    @mcp.tool()
    async def confluence_get_page_content(page_id: str) -> dict:
        """Get content of a specific Confluence page.
    
        Args:
            page_id: Page ID
        """
        return await confluence_tools.get_page_content(page_id=page_id)
  • Core helper method in ConfluenceTools class that fetches page content using the Atlassian Confluence client, extracts metadata and storage body.
    async def get_page_content(
        self, page_id: str, expand: Optional[str] = "body.storage,version"
    ) -> Dict[str, Any]:
        """
        Get content of a specific Confluence page.
    
        Args:
            page_id: Page ID
            expand: Expand parameters (default: "body.storage,version")
    
        Returns:
            Page content and metadata
        """
        self._check_client()
    
        try:
            page = self.client.get_page_by_id(
                page_id=page_id,
                expand=expand,
            )
    
            result = {
                "id": page.get("id"),
                "title": page.get("title"),
                "type": page.get("type"),
                "status": page.get("status"),
            }
    
            # Add URL
            if "_links" in page and "webui" in page["_links"]:
                result["url"] = f"{Config.CONFLUENCE_URL}{page['_links']['webui']}"
    
            # Add version info
            if "version" in page:
                result["version"] = {
                    "number": page["version"].get("number"),
                    "by": page["version"].get("by", {}).get("displayName"),
                    "when": page["version"].get("when"),
                }
    
            # Add space info
            if "space" in page:
                result["space"] = {
                    "key": page["space"].get("key"),
                    "name": page["space"].get("name"),
                }
    
            # Add content
            if "body" in page and "storage" in page["body"]:
                result["content"] = page["body"]["storage"].get("value")
    
            return result
    
        except Exception as e:
            logger.error(f"Confluence API error: {e}")
            raise ValueError(f"Failed to get page content: {str(e)}")
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic operation. It doesn't disclose behavioral traits like whether this is a read-only operation (implied but not stated), authentication requirements, rate limits, error conditions, or what format the content returns (though output schema exists). For a tool with zero annotation coverage, this is insufficient.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately brief with two sentences: one stating the purpose and another listing the parameter. It's front-loaded with the main function. However, the 'Args:' section could be integrated more smoothly rather than as a separate labeled section.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which handles return values) and only one parameter, the description is minimally complete but lacks important context. With no annotations and siblings that overlap in function, it should provide more guidance on usage and behavioral expectations to be fully helpful to an agent.

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 0%, so the description must compensate. It adds the parameter name 'page_id' and clarifies it's for a 'specific Confluence page', providing basic semantics beyond the bare schema. However, it doesn't explain what a Page ID is, where to find it, or format requirements, leaving significant gaps despite the single parameter.

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 ('Get') and resource ('content of a specific Confluence page'), making the purpose understandable. It distinguishes from siblings like 'confluence_get_page_by_title' by specifying content retrieval rather than page metadata, but doesn't explicitly contrast with 'confluence_list_pages' or 'confluence_search_pages' for when to use each.

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 like 'confluence_get_page_by_title' (which uses title instead of ID) or 'confluence_list_pages' (which lists pages rather than getting content). The description only states what it does, not when it's appropriate compared to sibling tools.

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/bsangars/mcp'

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