Skip to main content
Glama

activatePage

Publish a single page in Adobe Experience Manager to make it live on your website. Use this tool to activate specific content pages for public viewing.

Instructions

Activate (publish) a single page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagePathYes
activateTreeNo

Implementation Reference

  • Core handler function that executes the page activation by posting to AEM replication endpoints (/bin/replicate.json or fallback /bin/wcmcommand). Handles parameters pagePath and activateTree.
    async activatePage(request) {
        return safeExecute(async () => {
            const { pagePath, activateTree = false } = request;
            if (!isValidContentPath(pagePath)) {
                throw createAEMError(AEM_ERROR_CODES.INVALID_PARAMETERS, `Invalid page path: ${String(pagePath)}`, { pagePath });
            }
            try {
                // Use the correct AEM replication servlet endpoint
                const formData = new URLSearchParams();
                formData.append('cmd', 'Activate');
                formData.append('path', pagePath);
                formData.append('ignoredeactivated', 'false');
                formData.append('onlymodified', 'false');
                if (activateTree) {
                    formData.append('deep', 'true');
                }
                const response = await this.httpClient.post('/bin/replicate.json', formData, {
                    headers: {
                        'Content-Type': 'application/x-www-form-urlencoded',
                    },
                });
                return createSuccessResponse({
                    success: true,
                    activatedPath: pagePath,
                    activateTree,
                    response: response.data,
                    timestamp: new Date().toISOString(),
                }, 'activatePage');
            }
            catch (error) {
                // Fallback to alternative replication methods
                try {
                    const wcmResponse = await this.httpClient.post('/bin/wcmcommand', {
                        cmd: 'activate',
                        path: pagePath,
                        ignoredeactivated: false,
                        onlymodified: false,
                    });
                    return createSuccessResponse({
                        success: true,
                        activatedPath: pagePath,
                        activateTree,
                        response: wcmResponse.data,
                        fallbackUsed: 'WCM Command',
                        timestamp: new Date().toISOString(),
                    }, 'activatePage');
                }
                catch (fallbackError) {
                    throw handleAEMHttpError(error, 'activatePage');
                }
            }
        }, 'activatePage');
  • MCP tool schema definition including input schema for parameters pagePath (required) and activateTree (optional boolean).
        name: 'activatePage',
        description: 'Activate (publish) a single page',
        inputSchema: {
            type: 'object',
            properties: {
                pagePath: { type: 'string' },
                activateTree: { type: 'boolean' },
            },
            required: ['pagePath'],
        },
    },
  • MCP server registration: the callToolRequest handler switch case that invokes aemConnector.activatePage with tool arguments.
    case 'activatePage': {
        const result = await aemConnector.activatePage(args);
        return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
  • Delegation handler in AEMConnector class that forwards activatePage calls to the PageOperations module.
    async activatePage(request) {
        return this.pageOps.activatePage(request);
  • Handler in MCPRequestHandler class switch statement that dispatches to aemConnector.activatePage.
    case 'activatePage':
        return await this.aemConnector.activatePage(params);
Behavior2/5

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

With no annotations, the description carries full burden but only states the action ('activate/publish') without disclosing behavioral traits like permissions needed, whether it's destructive, rate limits, or what 'activate' entails (e.g., making page live, workflow changes). This leaves critical gaps for a mutation tool.

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, efficient sentence with zero waste—it's front-loaded and appropriately sized for the tool's apparent complexity, earning its place without 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?

Given no annotations, 0% schema coverage, no output schema, and a mutation tool with 2 parameters, the description is incomplete. It lacks details on behavior, parameters, and output, making it inadequate for safe and effective use by an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate but adds no parameter details. It doesn't explain what 'pagePath' is (e.g., format, scope) or what 'activateTree' does (e.g., publish child pages). This fails to provide meaning beyond the bare schema.

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 verb ('activate/publish') and resource ('a single page'), making the purpose unambiguous. However, it doesn't differentiate from sibling tools like 'replicateAndPublish' or 'deactivatePage', which would require explicit comparison for a perfect score.

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 like 'replicateAndPublish' or 'deactivatePage'. The description implies it's for publishing pages, but lacks context on prerequisites, timing, or exclusions, leaving usage unclear.

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/indrasishbanerjee/aem-mcp-server'

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