Skip to main content
Glama
aaronsb

Confluence MCP Server

create_confluence_page

Create a new page in a Confluence space by specifying the space ID, title, and content in storage format; optionally set a parent page ID for hierarchy.

Instructions

Create a new page in a space

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
spaceIdYesID of the space to create the page in
titleYesTitle of the page
contentYesContent of the page in Confluence storage format
parentIdNoID of the parent page (optional)

Implementation Reference

  • The main handler function for the create_confluence_page tool. Validates required params (spaceId, title, content), calls the Confluence API client, and returns a simplified response with id, version, and URL.
    export async function handleCreateConfluencePage(
      client: ConfluenceClient,
      args: { spaceId: string; title: string; content: string; parentId?: string }
    ): Promise<{
      content: Array<{ type: "text"; text: string }>;
    }> {
      try {
        if (!args.spaceId || !args.title || !args.content) {
          throw new McpError(
            ErrorCode.InvalidParams,
            "spaceId, title, and content are required"
          );
        }
    
        const page = await client.createConfluencePage(
          args.spaceId,
          args.title,
          args.content,
          args.parentId
        );
    
        const simplified = {
          id: page.id,
          version: page.version.number,
          url: page._links.webui
        };
    
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(simplified),
            },
          ],
        };
      } catch (error) {
        console.error("Error creating page:", error instanceof Error ? error.message : String(error));
        if (error instanceof McpError) {
          throw error;
        }
        throw new McpError(
          ErrorCode.InternalError,
          `Failed to create page: ${error instanceof Error ? error.message : String(error)}`
        );
      }
    }
  • Input schema for create_confluence_page defining required params (spaceId, title, content) and optional parentId.
    create_confluence_page: {
      description: "Create a new page in a space",
      inputSchema: {
        type: "object",
        properties: {
          spaceId: {
            type: "string",
            description: "ID of the space to create the page in",
          },
          title: {
            type: "string",
            description: "Title of the page",
          },
          content: {
            type: "string",
            description: "Content of the page in Confluence storage format",
          },
          parentId: {
            type: "string",
            description: "ID of the parent page (optional)",
          },
        },
        required: ["spaceId", "title", "content"],
      },
    },
  • src/index.ts:224-234 (registration)
    Registration of the create_confluence_page tool in the CallToolRequestSchema handler. It extracts args and delegates to handleCreateConfluencePage.
    case "create_confluence_page": {
      const { spaceId, title, content, parentId } = (args || {}) as { 
        spaceId: string; 
        title: string; 
        content: string; 
        parentId?: string 
      };
      if (!spaceId || !title || !content) {
        throw new McpError(ErrorCode.InvalidParams, "spaceId, title, and content are required");
      }
      return await handleCreateConfluencePage(this.confluenceClient, { spaceId, title, content, parentId });
  • The ConfluenceClient helper method that actually sends the POST request to the Confluence API v2 endpoint /pages to create the page.
    async createConfluencePage(spaceId: string, title: string, content: string, parentId?: string): Promise<Page> {
      const body = {
        spaceId,
        status: 'current',
        title,
        body: {
          representation: 'storage',
          value: content
        },
        ...(parentId && { parentId })
      };
    
      const response = await this.v2Client.post('/pages', body);
      return response.data;
    }
Behavior2/5

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

With no annotations, the description should disclose behavioral traits beyond creation. It fails to mention that the page is created in Confluence storage format, or any side effects, authentication requirements, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise at one sentence, which is efficient. However, it may be too terse to be fully informative, but it does not waste words.

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

Completeness2/5

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

Given the tool has 4 parameters, 3 required, and no output schema, the description is incomplete. It does not explain the storage format for content, the optional parentId behavior, or what the response looks like.

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 input schema has 100% description coverage, so the description adds no additional meaning. The description simply repeats the overall purpose without enhancing parameter understanding.

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

Purpose4/5

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

The description clearly states the tool creates a page, but does not differentiate from sibling tools like update_confluence_page or list_confluence_pages. However, the verb+resource combination is specific enough for basic understanding.

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 is provided on when to use this tool versus alternatives. It does not mention prerequisites, such as needing space access, or when to use update instead.

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