Skip to main content
Glama
aaronsb

Confluence MCP Server

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 });
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 describes the return format ('page IDs, titles, and metadata') and hints at pagination through the tip about completeness, but does not explicitly mention rate limits, authentication needs, or error handling. It adds useful context beyond basic functionality, though not exhaustive.

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 guidelines and a tip, all in three concise sentences. Each sentence adds value without redundancy, making it efficient and well-structured for quick comprehension.

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 moderate complexity (list operation with pagination), no annotations, and no output schema, the description does a good job covering purpose, usage, and return format. However, it lacks details on error cases or advanced behavioral traits (e.g., sorting, permissions), leaving minor gaps in completeness for a tool without structured output documentation.

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 schema description coverage is 100%, so the schema already documents all parameters (spaceId, limit, start) with their types and descriptions. The description does not add any additional semantic details about the parameters beyond what the schema provides, such as format examples or constraints, meeting 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 specific action ('List all pages'), resource ('in a Confluence space'), and scope ('all pages'), distinguishing it from siblings like search_confluence_pages (for specific terms) and find_confluence_page (likely for individual pages). It explicitly names the tool's purpose without being vague or tautological.

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 provides explicit guidance on when to use this tool ('when you need to explore all content in a specific space rather than searching for specific terms') and when not to use it (implying search_confluence_pages is better for targeted searches). It names an alternative tool (search_confluence_pages) and explains the trade-off, offering clear context for selection.

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