Skip to main content
Glama
aaronsb

Confluence MCP Server

list_confluence_spaces

Retrieve Confluence space IDs, names, and keys to begin content discovery workflows. Use this tool first to identify available spaces for further operations.

Instructions

List all available Confluence spaces. Best used as the first step in a content discovery workflow. Returns space IDs, names, and keys that you can use with other tools. TIP: Use a higher limit (e.g., 100) on first call to get a comprehensive view of available spaces.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of spaces to return (default: 25)
startNoStarting index for pagination (default: 0)

Implementation Reference

  • The handler function that executes the list_confluence_spaces tool logic. It fetches spaces from the Confluence client, simplifies the response, and formats it as MCP text content.
    export async function handleListConfluenceSpaces(
      client: ConfluenceClient,
      args: { limit?: number; start?: number }
    ): Promise<{
      content: Array<{ type: "text"; text: string }>;
    }> {
      try {
        const spaces = await client.getConfluenceSpaces(args.limit, args.start);
        // Transform to minimal format
        const simplified = {
          results: spaces.results.map(space => ({
            id: space.id,
            name: space.name,
            key: space.key,
            status: space.status
          })),
          next: spaces._links.next ? true : false
        };
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(simplified),
            },
          ],
        };
      } catch (error) {
        console.error("Error listing spaces:", error instanceof Error ? error.message : String(error));
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to list spaces: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • The input schema and description definition for the list_confluence_spaces tool.
    list_confluence_spaces: {
      description: "List all available Confluence spaces. Best used as the first step in a content discovery workflow. Returns space IDs, names, and keys that you can use with other tools. TIP: Use a higher limit (e.g., 100) on first call to get a comprehensive view of available spaces.",
      inputSchema: {
        type: "object",
        properties: {
          limit: {
            type: "number",
            description: "Maximum number of spaces to return (default: 25)",
          },
          start: {
            type: "number",
            description: "Starting index for pagination (default: 0)",
          },
        },
      },
    },
  • src/index.ts:198-200 (registration)
    The switch case in the main tool request handler that registers and calls the list_confluence_spaces tool implementation.
    case "list_confluence_spaces": {
      const { limit, start } = (args || {}) as { limit?: number; start?: number };
      return await handleListConfluenceSpaces(this.confluenceClient, { limit, start });
Behavior4/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. It effectively describes the tool's behavior: it's a read operation (implied by 'List'), returns specific data fields (IDs, names, keys), supports pagination (implied by the tip about limit), and is intended for discovery workflows. However, it doesn't mention potential limitations like rate limits, authentication needs, or error conditions, leaving some gaps in behavioral context.

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 front-loaded with the core purpose, followed by usage guidance and a practical tip. Every sentence earns its place: the first states what it does, the second explains when to use it, the third describes the output, and the fourth provides optimization advice. It's appropriately sized with zero waste, making it highly efficient and easy to parse.

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

Completeness4/5

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

Given the tool's low complexity (2 parameters, no output schema, no annotations), the description is mostly complete. It covers purpose, usage, output format, and a parameter tip. However, without annotations or an output schema, it could benefit from more detail on behavioral aspects like error handling or pagination mechanics, but it's sufficient for a basic list operation.

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%, so the schema already documents both parameters (limit and start) with their types and defaults. The description adds value by providing a usage tip ('Use a higher limit (e.g., 100) on first call'), which gives practical context beyond the schema's technical details. However, it doesn't explain parameter interactions or edge cases, 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.

Purpose5/5

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

The description clearly states the verb ('List') and resource ('all available Confluence spaces'), distinguishing it from siblings like 'get_confluence_space' (singular) and 'list_confluence_pages' (pages instead of spaces). It specifies the scope ('all available') and output format ('space IDs, names, and keys'), making the purpose specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use this tool ('Best used as the first step in a content discovery workflow') and provides a practical tip for usage ('Use a higher limit (e.g., 100) on first call'). It also implies an alternative by mentioning that the output can be used 'with other tools,' though it doesn't name specific alternatives. This gives clear context and guidance for effective use.

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

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