Skip to main content
Glama

deleteAsset

Remove assets from Adobe Experience Manager's Digital Asset Management system by specifying the asset path, with an optional force parameter for immediate deletion.

Instructions

Delete an asset from AEM DAM

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetPathYes
forceNo

Implementation Reference

  • Core handler function that validates the asset path, performs HTTP DELETE request to AEM DAM, and returns success response.
    async deleteAsset(request: DeleteAssetRequest): Promise<DeleteResponse> {
      return safeExecute<DeleteResponse>(async () => {
        const { assetPath, force = false } = request;
        
        if (!isValidContentPath(assetPath)) {
          throw createAEMError(
            AEM_ERROR_CODES.INVALID_PARAMETERS, 
            `Invalid asset path: ${String(assetPath)}`, 
            { assetPath }
          );
        }
    
        await this.httpClient.delete(assetPath);
        
        return createSuccessResponse({
          success: true,
          deletedPath: assetPath,
          force,
          timestamp: new Date().toISOString(),
        }, 'deleteAsset') as DeleteResponse;
      }, 'deleteAsset');
    }
  • Tool registration in the MCP tools array, including name, description, and input schema.
      name: 'deleteAsset',
      description: 'Delete an asset from AEM DAM',
      inputSchema: {
        type: 'object',
        properties: {
          assetPath: { type: 'string' },
          force: { type: 'boolean' },
        },
        required: ['assetPath'],
      },
    },
  • MCP server request handler that delegates to AEMConnector.deleteAsset and formats response for MCP protocol.
    case 'deleteAsset': {
      const result = await aemConnector.deleteAsset(args);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
    }
  • TypeScript interface defining the input parameters for deleteAsset.
    export interface DeleteAssetRequest {
      assetPath: string;
      force?: boolean;
    }
  • TypeScript interface defining the response structure for delete operations, used by deleteAsset.
    export interface DeleteResponse extends BaseResponse {
      data: {
        success: boolean;
        deletedPath: string;
        timestamp: string;
      };
    }
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 states the tool deletes an asset, implying a destructive mutation, but does not address critical aspects like irreversibility, permissions required, confirmation steps, or error handling. This leaves significant gaps in understanding the tool's behavior and risks.

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, direct sentence with no wasted words, making it highly concise and front-loaded. It efficiently communicates the core action without unnecessary elaboration, though this brevity contributes to gaps in other dimensions.

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 destructive tool with no annotations, 0% schema coverage, and no output schema, the description is incomplete. It lacks details on behavioral traits, parameter meanings, return values, and usage context, making it inadequate for safe and effective tool invocation by an 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 'asset' but does not explain the 'assetPath' parameter (e.g., format, examples) or the 'force' parameter (e.g., what it overrides, default behavior). This fails to add meaningful semantics 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 action ('Delete') and resource ('an asset from AEM DAM'), making the purpose unambiguous. It distinguishes from siblings like 'deletePage' or 'deleteComponent' by specifying 'asset', but does not explicitly differentiate from similar tools like 'unpublishContent' or 'restoreVersion' in terms of scope or effect.

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' for removing access or 'restoreVersion' for recovery. It lacks context on prerequisites, permissions, or scenarios where deletion is appropriate, leaving the agent to infer usage from the name alone.

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