Skip to main content
Glama

deleteVersion

Remove specific versions of content in Adobe Experience Manager by specifying the path and version name to manage repository space and content history.

Instructions

Delete a specific version

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
versionNameYes

Implementation Reference

  • MCP tool registration for 'deleteVersion' including input schema definition (path and versionName required).
      {
        name: 'deleteVersion',
        description: 'Delete a specific version',
        inputSchema: {
          type: 'object',
          properties: {
            path: { type: 'string' },
            versionName: { type: 'string' }
          },
          required: ['path', 'versionName'],
        },
      },
    ];
  • Primary MCP server handler for the 'deleteVersion' tool: extracts parameters from MCP request, delegates to AEMConnector.deleteVersion, and formats response.
    case 'deleteVersion': {
      const { path, versionName } = args as { path: string; versionName: string };
      const result = await aemConnector.deleteVersion(path, versionName);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • AEMConnector method that delegates deleteVersion call to the VersionOperations module.
    async deleteVersion(path: string, versionName: string) {
      return this.versionOps.deleteVersion(path, versionName);
    }
  • Core implementation of deleteVersion: validates inputs, constructs form data with cmd='deleteVersion', posts to AEM versioning endpoint '/bin/wcm/versioning/deleteVersion', logs, and returns structured success response.
    async deleteVersion(path: string, versionName: string): Promise<DeleteVersionResponse> {
      return safeExecute<DeleteVersionResponse>(async () => {
        if (!isValidContentPath(path)) {
          throw createAEMError(
            AEM_ERROR_CODES.INVALID_PARAMETERS,
            `Invalid content path: ${path}`,
            { path }
          );
        }
    
        if (!versionName || typeof versionName !== 'string') {
          throw createAEMError(
            AEM_ERROR_CODES.INVALID_PARAMETERS,
            'Version name is required',
            { versionName }
          );
        }
    
        try {
          // Delete version using AEM's versioning API
          const formData = new URLSearchParams();
          formData.append('cmd', 'deleteVersion');
          formData.append('path', path);
          formData.append('version', versionName);
    
          await this.httpClient.post('/bin/wcm/versioning/deleteVersion', formData, {
            headers: {
              'Content-Type': 'application/x-www-form-urlencoded',
            },
          });
    
          this.logger.info(`Deleted version for path: ${path}`, {
            versionName
          });
    
          return createSuccessResponse({
            path,
            deletedVersion: versionName,
            deletedAt: new Date().toISOString(),
            deletedBy: this.config.serviceUser.username
          }, 'deleteVersion') as DeleteVersionResponse;
    
        } catch (error: any) {
          throw handleAEMHttpError(error, 'deleteVersion');
        }
      }, 'deleteVersion');
    }
Behavior1/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the action 'delete' without explaining critical traits such as whether deletion is permanent or reversible, what permissions are required, if it affects other versions or content, or what happens on success/failure. This is inadequate for a destructive operation 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 extremely concise with a single sentence 'Delete a specific version', which is front-loaded and wastes no words. However, this brevity comes at the cost of under-specification, but for conciseness alone, it scores high as every word serves a purpose.

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

Completeness1/5

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

Given the tool's complexity (a destructive operation with 2 parameters), lack of annotations, 0% schema coverage, and no output schema, the description is severely incomplete. It does not address behavioral risks, parameter meanings, usage context, or expected outcomes, making it inadequate for safe and effective tool invocation.

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

Parameters1/5

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

Schema description coverage is 0%, meaning neither parameter ('path' or 'versionName') is documented in the schema. The description adds no information about what these parameters mean, their expected formats, or examples (e.g., 'path' could be a file path or node path, 'versionName' could be a label or ID). This fails to compensate for the complete lack of schema documentation.

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

Purpose2/5

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

The description 'Delete a specific version' is essentially a tautology that restates the tool name 'deleteVersion' with minimal elaboration. While it does specify the verb 'delete' and resource 'version', it lacks any distinguishing details about what type of version (e.g., page version, asset version, workflow version) or what system it operates in, making it vague compared to siblings like 'deleteAsset', 'deletePage', or 'restoreVersion'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines1/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. It does not mention prerequisites (e.g., needing an existing version), exclusions (e.g., cannot delete active versions), or related tools like 'restoreVersion' or 'getVersionHistory' from the sibling list, leaving the agent with no context for selection.

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