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; }; }

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