Skip to main content
Glama

confluence_get_page_by_title

Retrieve Confluence documentation pages by title to access specific information, with optional space key filtering for targeted search results.

Instructions

Get a Confluence page by its title.

Args: title: Page title space_key: Space key (optional, defaults to CONFLUENCE_SPACE_KEY env var)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
space_keyNo
titleYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP handler function for the 'confluence_get_page_by_title' tool. Registers the tool with FastMCP and delegates execution to ConfluenceTools.get_page_by_title.
    @mcp.tool()
    async def confluence_get_page_by_title(
        title: str, space_key: Optional[str] = None
    ) -> dict:
        """Get a Confluence page by its title.
    
        Args:
            title: Page title
            space_key: Space key (optional, defaults to CONFLUENCE_SPACE_KEY env var)
        """
        return await confluence_tools.get_page_by_title(
            title=title, space_key=space_key
        )
  • Supporting utility in ConfluenceTools class that implements the core logic: fetches the page using Atlassian client.get_page_by_title, handles defaults and errors, and formats the response with ID, title, URL, version, space, and storage content.
    async def get_page_by_title(
        self, title: str, space_key: Optional[str] = None
    ) -> Optional[Dict[str, Any]]:
        """
        Get a page by its title.
    
        Args:
            title: Page title
            space_key: Space key (defaults to CONFLUENCE_SPACE_KEY env var)
    
        Returns:
            Page information or None if not found
        """
        self._check_client()
    
        try:
            space_key = space_key or Config.CONFLUENCE_SPACE_KEY
            if not space_key:
                raise ValueError("Space key is required")
    
            page = self.client.get_page_by_title(
                space=space_key,
                title=title,
                expand="body.storage,version",
            )
    
            if not page:
                return None
    
            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 by title: {str(e)}")
  • Explicit input schema definition for the tool, used in the LLM assistant integration with Claude.
    {
        "name": "confluence_get_page_by_title",
        "description": "Get a Confluence page by its title",
        "input_schema": {
            "type": "object",
            "properties": {
                "title": {"type": "string", "description": "Page title"},
                "space_key": {"type": "string", "description": "Space key"},
            },
            "required": ["title"],
        },
    },
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. It states the tool 'Get[s] a Confluence page,' implying a read-only operation, but doesn't disclose behavioral traits such as authentication needs, rate limits, error handling, or what happens if multiple pages share the same title. For a tool with no annotation coverage, this is a significant gap.

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 sized and front-loaded: the first sentence states the purpose clearly, followed by an 'Args:' section that efficiently lists parameters. There's no wasted text, though the structure could be slightly improved by integrating parameter details more seamlessly.

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 likely describes return values), the description doesn't need to explain outputs. However, with no annotations, 0% schema description coverage, and multiple sibling tools, it lacks completeness in usage guidance and behavioral context, making it adequate but with clear gaps.

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 description adds some parameter semantics: it clarifies that 'title' is the 'Page title' and 'space_key' is 'Space key (optional, defaults to CONFLUENCE_SPACE_KEY env var).' With 0% schema description coverage, this compensates partially by explaining the optional nature and default for 'space_key,' but doesn't fully detail parameter formats or constraints beyond what's implied.

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 tool's purpose: 'Get a Confluence page by its title.' It specifies the verb ('Get') and resource ('Confluence page'), and the title parameter clarifies it's title-based retrieval. However, it doesn't explicitly differentiate from sibling tools like 'confluence_search_pages' or 'confluence_list_pages', which might also retrieve pages.

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. With siblings like 'confluence_search_pages' and 'confluence_list_pages' available, there's no indication of when title-based lookup is preferred over search or listing methods, nor any mention of prerequisites or constraints.

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