Skip to main content
Glama

confluence_create_page

Create a new Confluence page in a specified space. Include title, content, and optionally set a parent page.

Instructions

Create a new Confluence page in a specific space

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesThe title of the new page
spaceKeyYesThe key of the space where the page will be created
contentYesThe page content in Confluence storage format (HTML)
parentIdNoOptional ID of the parent page (creates a child page)

Implementation Reference

  • The createPage function executes the tool logic by making a POST request to the Confluence REST API to create a new page with title, spaceKey, content, and optional parentId.
    async function createPage(title, spaceKey, content, parentId = null) {
      try {
        const payload = {
          type: 'page',
          title,
          space: { key: spaceKey },
          body: {
            storage: {
              value: content,
              representation: 'storage'
            }
          }
        };
    
        if (parentId) {
          payload.ancestors = [{ id: parentId }];
        }
    
        const response = await client.post(`${CONFLUENCE_API_BASE}/content`, payload);
        return response.data;
      } catch (error) {
        throw new Error(`Failed to create page: ${error.message}`);
      }
    }
  • The case 'confluence_create_page' handler in the CallToolRequestSchema switch statement that dispatches to the createPage function.
    case 'confluence_create_page': {
      const result = await createPage(
        args.title,
        args.spaceKey,
        args.content,
        args.parentId
      );
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(result, null, 2),
          },
        ],
      };
    }
  • Registration of the confluence_create_page tool with its inputSchema defining required parameters: title, spaceKey, content, and optional parentId.
    name: 'confluence_create_page',
    description: 'Create a new Confluence page in a specific space',
    inputSchema: {
      type: 'object',
      properties: {
        title: {
          type: 'string',
          description: 'The title of the new page',
        },
        spaceKey: {
          type: 'string',
          description: 'The key of the space where the page will be created',
        },
        content: {
          type: 'string',
          description: 'The page content in Confluence storage format (HTML)',
        },
        parentId: {
          type: 'string',
          description: 'Optional ID of the parent page (creates a child page)',
        },
      },
      required: ['title', 'spaceKey', 'content'],
    },
  • index.js:226-397 (registration)
    The confluence_create_page tool is registered inside the ListToolsRequestSchema handler within the tools array, along with all other tools.
    // Register tools
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: [
          {
            name: 'confluence_search',
            description: 'Search Confluence content using CQL (Confluence Query Language). Example queries: "type=page AND title~\\"API\\"", "type=page ORDER BY lastmodified DESC"',
            inputSchema: {
              type: 'object',
              properties: {
                query: {
                  type: 'string',
                  description: 'CQL search query (e.g., "type=page AND title~\\"keyword\\"")',
                },
                limit: {
                  type: 'number',
                  description: 'Maximum number of results (default: 10)',
                },
                spaceKey: {
                  type: 'string',
                  description: 'Optional space key to limit search to a specific space',
                },
              },
              required: ['query'],
            },
          },
          {
            name: 'confluence_list_spaces',
            description: 'List all Confluence spaces accessible to the user',
            inputSchema: {
              type: 'object',
              properties: {
                limit: {
                  type: 'number',
                  description: 'Maximum number of spaces to return (default: 25)',
                },
              },
            },
          },
          {
            name: 'confluence_get_page',
            description: 'Get a Confluence page by ID including its content, version, and metadata',
            inputSchema: {
              type: 'object',
              properties: {
                pageId: {
                  type: 'string',
                  description: 'The ID of the page to retrieve',
                },
              },
              required: ['pageId'],
            },
          },
          {
            name: 'confluence_get_page_by_title',
            description: 'Find a Confluence page by its title and space key',
            inputSchema: {
              type: 'object',
              properties: {
                title: {
                  type: 'string',
                  description: 'The exact title of the page',
                },
                spaceKey: {
                  type: 'string',
                  description: 'The key of the space containing the page',
                },
              },
              required: ['title', 'spaceKey'],
            },
          },
          {
            name: 'confluence_get_space',
            description: 'Get information about a specific Confluence space',
            inputSchema: {
              type: 'object',
              properties: {
                spaceKey: {
                  type: 'string',
                  description: 'The key of the space to retrieve',
                },
              },
              required: ['spaceKey'],
            },
          },
          {
            name: 'confluence_create_page',
            description: 'Create a new Confluence page in a specific space',
            inputSchema: {
              type: 'object',
              properties: {
                title: {
                  type: 'string',
                  description: 'The title of the new page',
                },
                spaceKey: {
                  type: 'string',
                  description: 'The key of the space where the page will be created',
                },
                content: {
                  type: 'string',
                  description: 'The page content in Confluence storage format (HTML)',
                },
                parentId: {
                  type: 'string',
                  description: 'Optional ID of the parent page (creates a child page)',
                },
              },
              required: ['title', 'spaceKey', 'content'],
            },
          },
          {
            name: 'confluence_update_page',
            description: 'Update an existing Confluence page',
            inputSchema: {
              type: 'object',
              properties: {
                pageId: {
                  type: 'string',
                  description: 'The ID of the page to update',
                },
                title: {
                  type: 'string',
                  description: 'The new title for the page',
                },
                content: {
                  type: 'string',
                  description: 'The new content in Confluence storage format (HTML)',
                },
                version: {
                  type: 'number',
                  description: 'Current version number of the page (will be incremented)',
                },
              },
              required: ['pageId', 'title', 'content', 'version'],
            },
          },
          {
            name: 'confluence_add_labels',
            description: 'Add labels (tags) to a Confluence page',
            inputSchema: {
              type: 'object',
              properties: {
                pageId: {
                  type: 'string',
                  description: 'The ID of the page',
                },
                labels: {
                  type: 'array',
                  items: { type: 'string' },
                  description: 'Array of label names to add',
                },
              },
              required: ['pageId', 'labels'],
            },
          },
          {
            name: 'confluence_get_attachments',
            description: 'Get list of attachments for a Confluence page',
            inputSchema: {
              type: 'object',
              properties: {
                pageId: {
                  type: 'string',
                  description: 'The ID of the page',
                },
              },
              required: ['pageId'],
            },
          },
        ],
      };
  • The Confluence API base URL configuration and axios HTTP client used by createPage for making API calls.
    // API Base URL
    const CONFLUENCE_API_BASE = `https://${ATLASSIAN_SITE}/wiki/rest/api`;
    
    // HTTP client with auth
    const client = axios.create({
      auth: {
        username: ATLASSIAN_EMAIL,
        password: ATLASSIAN_API_TOKEN,
      },
      headers: {
        'Accept': 'application/json',
        'Content-Type': 'application/json',
      },
    });
Behavior2/5

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

No annotations provided, so the description must carry the burden. It only says 'Create', implying mutation, but does not disclose permissions, side effects, or return values.

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?

Very concise, one sentence with clear purpose. Front-loaded but could be slightly more descriptive without losing conciseness.

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?

No output schema, but description does not explain what the tool returns (e.g., page ID). Missing context about behavior after creation.

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 coverage is 100%, so baseline 3. The description adds no extra meaning beyond what the schema already provides for parameters.

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 'Create', the resource 'a new Confluence page', and the scope 'in a specific space', which distinguishes it from siblings like update_page or get_page.

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 on when to use or when not to use this tool. Does not mention alternatives or prerequisites, such as needing an existing space or parent page.

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/gkrauchunas-arlo/confluence-mcp'

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