Skip to main content
Glama

deactivatePage

Unpublish a page in Adobe Experience Manager to remove it from public view. Optionally deactivate child pages in the hierarchy.

Instructions

Deactivate (unpublish) a single page

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pagePathYes
deactivateTreeNo

Implementation Reference

  • Core handler function that performs the actual deactivation by calling AEM replication API with fallback methods.
    async deactivatePage(request: DeactivatePageRequest): Promise<DeactivateResponse> {
      return safeExecute<DeactivateResponse>(async () => {
        const { pagePath, deactivateTree = 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', 'Deactivate');
          formData.append('path', pagePath);
          formData.append('ignoredeactivated', 'false');
          formData.append('onlymodified', 'false');
          
          if (deactivateTree) {
            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,
            deactivatedPath: pagePath,
            deactivateTree,
            response: response.data,
            timestamp: new Date().toISOString(),
          }, 'deactivatePage') as DeactivateResponse;
        } catch (error: any) {
          // Fallback to alternative replication methods
          try {
            const wcmResponse = await this.httpClient.post('/bin/wcmcommand', {
              cmd: 'deactivate',
              path: pagePath,
              ignoredeactivated: false,
              onlymodified: false,
            });
            
            return createSuccessResponse({
              success: true,
              deactivatedPath: pagePath,
              deactivateTree,
              response: wcmResponse.data,
              fallbackUsed: 'WCM Command',
              timestamp: new Date().toISOString(),
            }, 'deactivatePage') as DeactivateResponse;
          } catch (fallbackError: any) {
            throw handleAEMHttpError(error, 'deactivatePage');
          }
        }
      }, 'deactivatePage');
    }
  • MCP server dispatch handler that calls aemConnector.deactivatePage when the tool is invoked.
    case 'deactivatePage': {
      const result = await aemConnector.deactivatePage(args);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • MCP tool schema definition including input schema for deactivatePage.
    {
      name: 'deactivatePage',
      description: 'Deactivate (unpublish) a single page',
      inputSchema: {
        type: 'object',
        properties: {
          pagePath: { type: 'string' },
          deactivateTree: { type: 'boolean' },
        },
        required: ['pagePath'],
      },
    },
  • Intermediate handler dispatch in MCPRequestHandler.
    case 'deactivatePage':
      return await this.aemConnector.deactivatePage(params);
  • Wrapper method in AEMConnector that delegates to PageOperations.
    async deactivatePage(request: any) {
      return this.pageOps.deactivatePage(request);
    }
Behavior2/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 indicates a mutation action ('deactivate/unpublish') but lacks details on permissions required, whether changes are reversible, effects on related content, or error handling. This is insufficient for a mutation tool with zero annotation coverage.

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 that front-loads the core action and resource without any wasted words. It is appropriately sized for the tool's complexity, making it easy to parse quickly.

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 this is a mutation tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It lacks crucial details like behavioral traits, parameter meanings, and expected outcomes, which are necessary 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 for undocumented parameters. It mentions 'a single page' which hints at the 'pagePath' parameter, but doesn't explain the 'deactivateTree' parameter at all. The description adds minimal value beyond the schema, failing to fully address the coverage gap.

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 ('deactivate/unpublish') and the resource ('a single page'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'unpublishContent' or 'deletePage', which could have overlapping functionality, so it doesn't reach the highest 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?

The description provides no guidance on when to use this tool versus alternatives such as 'unpublishContent' or 'deletePage', nor does it mention prerequisites or exclusions. It merely states what the tool does without contextual usage information.

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