Skip to main content
Glama

list_confluence_pages

Retrieve all pages in a Confluence space to explore content, get page IDs and titles, and create a complete inventory when search might miss relevant items.

Instructions

List all pages in a Confluence space. Best used when you need to explore all content in a specific space rather than searching for specific terms. Returns page IDs, titles, and metadata. TIP: Use this when search_confluence_pages might miss relevant pages or when you need a complete inventory of pages in a space.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spaceIdYesID of the space to list pages from
limitNoMaximum number of pages to return (default: 25)
startNoStarting index for pagination (default: 0)

Implementation Reference

  • The primary handler function that implements the list_confluence_pages tool. It validates input, fetches pages from the Confluence space using the client, simplifies the response, and returns it as JSON text content.
    export async function handleListConfluencePages( client: ConfluenceClient, args: { spaceId: string; limit?: number; start?: number } ): Promise<{ content: Array<{ type: "text"; text: string }>; }> { try { if (!args.spaceId) { throw new McpError(ErrorCode.InvalidParams, "spaceId is required"); } const pages = await client.getConfluencePages(args.spaceId, args.limit, args.start); const simplified = { results: pages.results.map(page => ({ id: page.id, title: page.title, spaceId: page.spaceId, version: page.version.number, parentId: page.parentId || null })), next: pages._links.next ? true : false }; return { content: [ { type: "text", text: JSON.stringify(simplified), }, ], }; } catch (error) { console.error("Error listing pages:", error instanceof Error ? error.message : String(error)); throw new McpError( ErrorCode.InternalError, `Failed to list pages: ${error instanceof Error ? error.message : String(error)}` ); }
  • Input schema and description for the list_confluence_pages tool, defining required spaceId and optional limit/start parameters.
    list_confluence_pages: { description: "List all pages in a Confluence space. Best used when you need to explore all content in a specific space rather than searching for specific terms. Returns page IDs, titles, and metadata. TIP: Use this when search_confluence_pages might miss relevant pages or when you need a complete inventory of pages in a space.", inputSchema: { type: "object", properties: { spaceId: { type: "string", description: "ID of the space to list pages from", }, limit: { type: "number", description: "Maximum number of pages to return (default: 25)", }, start: { type: "number", description: "Starting index for pagination (default: 0)", }, }, required: ["spaceId"], }, },
  • src/index.ts:209-212 (registration)
    Registration and dispatch logic in the main MCP tool request handler switch statement, which calls the specific handler for list_confluence_pages.
    case "list_confluence_pages": { const { spaceId, limit, start } = (args || {}) as { spaceId: string; limit?: number; start?: number }; if (!spaceId) throw new McpError(ErrorCode.InvalidParams, "spaceId is required"); return await handleListConfluencePages(this.confluenceClient, { spaceId, 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