Skip to main content
Glama

aem_create_page

Create new pages in Adobe Experience Manager by specifying parent path, name, title, and template for structured content management.

Instructions

Create a new page in AEM

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parentPathYesParent path where to create the page
pageNameYesName of the new page
pageTitleYesTitle of the new page
templateYesTemplate path for the page
hostNoAEM host (default: localhost)localhost
portNoAEM port (default: 4502)
usernameNoAEM username (default: admin)admin
passwordNoAEM password (default: admin)admin

Implementation Reference

  • Primary MCP tool handler for 'aem_create_page': validates inputs, calls AEMClient.createPage, formats and returns MCP-compatible response.
      async createPage(args: any) {
        const config = this.getConfig(args);
        const { parentPath, pageName, pageTitle, template } = args;
    
        if (!parentPath || !pageName || !pageTitle || !template) {
          throw new Error('parentPath, pageName, pageTitle, and template are required');
        }
    
        const result = await this.aemClient.createPage(config, parentPath, pageName, pageTitle, template);
        
        return {
          content: [
            {
              type: 'text',
              text: `Page Creation Result:
    Success: ${result.success}
    Message: ${result.message}
    ${result.path ? `Path: ${result.path}` : ''}
    Parent: ${parentPath}
    Name: ${pageName}
    Title: ${pageTitle}
    Template: ${template}`,
            },
          ],
        };
      }
  • Core implementation performing HTTP POST to AEM /bin/wcmcommand to create the page with required form parameters.
    async createPage(config: AEMConfig, parentPath: string, pageName: string, pageTitle: string, template: string): Promise<any> {
      const baseUrl = this.getBaseUrl(config);
      const authHeader = this.getAuthHeader(config);
    
      const formData = new FormData();
      formData.append('cmd', 'createPage');
      formData.append('parentPath', parentPath);
      formData.append('title', pageTitle);
      formData.append('label', pageName);
      formData.append('template', template);
    
      try {
        const response = await this.axiosInstance.post(
          `${baseUrl}/bin/wcmcommand`,
          formData,
          {
            headers: {
              'Authorization': authHeader,
              ...formData.getHeaders(),
            },
          }
        );
    
        if (response.status === 200 || response.status === 201) {
          return {
            success: true,
            message: `Page created successfully at ${parentPath}/${pageName}`,
            path: `${parentPath}/${pageName}`,
          };
        } else {
          return {
            success: false,
            message: `Page creation failed: HTTP ${response.status}`,
            response: response.data,
          };
        }
      } catch (error) {
        throw new Error(`Page creation failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
  • Input schema defining parameters, types, descriptions, defaults, and required fields for the 'aem_create_page' tool.
    {
      name: 'aem_create_page',
      description: 'Create a new page in AEM',
      inputSchema: {
        type: 'object',
        properties: {
          parentPath: {
            type: 'string',
            description: 'Parent path where to create the page'
          },
          pageName: {
            type: 'string',
            description: 'Name of the new page'
          },
          pageTitle: {
            type: 'string',
            description: 'Title of the new page'
          },
          template: {
            type: 'string',
            description: 'Template path for the page'
          },
          host: {
            type: 'string',
            description: 'AEM host (default: localhost)',
            default: 'localhost'
          },
          port: {
            type: 'number',
            description: 'AEM port (default: 4502)',
            default: 4502
          },
          username: {
            type: 'string',
            description: 'AEM username (default: admin)',
            default: 'admin'
          },
          password: {
            type: 'string',
            description: 'AEM password (default: admin)',
            default: 'admin'
          }
        },
        required: ['parentPath', 'pageName', 'pageTitle', 'template']
      }
    },
  • src/index.ts:359-360 (registration)
    Tool dispatcher registration: routes 'aem_create_page' tool calls to the AEMTools.createPage handler.
    case 'aem_create_page':
      return await this.aemTools.createPage(args);
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. While 'Create' implies a write/mutation operation, it doesn't specify permissions required, whether the operation is idempotent, what happens on conflicts (e.g., duplicate page names), or error conditions. For a mutation tool with zero annotation coverage, this leaves significant behavioral gaps.

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 a single, clear sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately scannable and efficient. Every word earns its place without redundancy or unnecessary elaboration.

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?

For a mutation tool with 8 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't address what the tool returns (success/failure indicators, created page details), error handling, authentication implications (despite auth parameters in schema), or how it fits within the broader AEM content lifecycle alongside siblings like replication or package installation.

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 description coverage is 100%, with all 8 parameters well-documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema (e.g., no examples, format clarifications, or relationship explanations). With high schema coverage, the baseline score of 3 is appropriate as the description doesn't enhance but also doesn't detract from 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 action ('Create') and resource ('new page in AEM'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling tools like 'aem_replicate_content' or 'aem_install_package' that might also involve content creation or management, leaving some ambiguity about its specific role within the toolset.

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?

The description provides no guidance on when to use this tool versus alternatives. With siblings like 'aem_query_content' for reading and 'aem_replicate_content' for publishing, there's no indication that this is specifically for initial page creation versus other content operations. No prerequisites, exclusions, or contextual usage hints are mentioned.

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/pradeep-moolemane/aem-mcp'

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