deleteAsset
Remove an asset from Adobe Experience Manager DAM by specifying its path using the AEM MCP Server, with optional force flag for immediate deletion.
Instructions
Delete an asset from AEM DAM
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assetPath | Yes | ||
| force | No |
Implementation Reference
- Core handler function implementing the deleteAsset tool: destructures request, validates assetPath, executes HTTP DELETE request, and constructs success response.async deleteAsset(request) { return safeExecute(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'); }, 'deleteAsset'); }
- dist/mcp-server.js:377-386 (registration)MCP tool registration entry defining the 'deleteAsset' tool with description and JSON input schema.name: 'deleteAsset', description: 'Delete an asset from AEM DAM', inputSchema: { type: 'object', properties: { assetPath: { type: 'string' }, force: { type: 'boolean' }, }, required: ['assetPath'], },
- dist/mcp-server.js:729-731 (handler)Top-level dispatch handler in MCP server for 'deleteAsset' tool calls, invoking aemConnector and formatting response.case 'deleteAsset': { const result = await aemConnector.deleteAsset(args); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
- dist/interfaces/index.d.ts:239-242 (schema)TypeScript interface defining the input parameters for deleteAsset request.export interface DeleteAssetRequest { assetPath: string; force?: boolean; }
- dist/interfaces/index.d.ts:285-291 (schema)TypeScript interface for the response structure returned by deleteAsset.export interface DeleteResponse extends BaseResponse { data: { success: boolean; deletedPath: string; timestamp: string; }; }