Skip to main content
Glama

list_spaces

Retrieve a list of all Confluence spaces accessible to the authenticated user. Optionally set a maximum number of spaces to return.

Instructions

List all Confluence spaces accessible to the authenticated user.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of spaces to return (default: 25, max: 100)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • ConfluenceClient.get_page_content helper method used by the fetch_page_markdown tool.
    def get_page_content(self, page_id: str) -> dict:
        """Fetch a specific page with its content."""
        params = {
            "expand": "body.storage,space,version,metadata.labels"
        }
        return self._make_request("GET", f"/content/{page_id}", params=params)
  • ConfluenceClient.list_spaces helper method that makes the actual API call to Confluence to list spaces.
    def list_spaces(self, limit: int = 25) -> list[dict]:
        """List all accessible Confluence spaces."""
        params = {
            "limit": limit,
            "type": "global"
        }
        response = self._make_request("GET", "/space", params=params)
        return response.get("results", [])
  • MCP tool handler for 'list_spaces'. Decorated with @mcp.tool(), it validates limit (1-100), calls confluence.list_spaces(), formats the response as JSON, and returns it.
    @mcp.tool()
    def list_spaces(limit: int = 25) -> str:
  • server.py:26-27 (registration)
    FastMCP server initialization. The @mcp.tool() decorator on line 114 registers the list_spaces function as an MCP tool.
    mcp = FastMCP("awesome-confluence-mcp")
Behavior2/5

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

With no annotations, the description provides no behavioral details beyond a basic listing. It does not mention pagination, rate limits, permissions, or that the operation is read-only.

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 concise sentence with no wasted words. It is front-loaded with the action and resource.

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 presence of an output schema, the description does not need to explain return values. However, it omits any mention of pagination behavior implied by the 'limit' parameter, which is relevant for completeness.

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 coverage is 100% for the single parameter 'limit', which already has a description. The tool description adds no extra meaning to the parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses the specific verb 'List' and resource 'Confluence spaces' with scope 'accessible to the authenticated user'. It clearly distinguishes from siblings which operate on pages rather than spaces.

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 on when to use this tool versus the siblings 'fetch_page_markdown' or 'search_pages'. The description does not mention alternative tools or contexts where one would be preferred.

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

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