Skip to main content
Glama

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 });

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