getAssetMetadata
Extract and retrieve detailed metadata from assets stored in Adobe Experience Manager using the MCP Server's REST/JSON-RPC APIs.
Instructions
Get asset metadata
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assetPath | Yes |
Implementation Reference
- dist/mcp-server.js:676-679 (handler)Primary MCP server handler for the 'getAssetMetadata' tool. Extracts the assetPath from arguments, calls AEMConnector.getAssetMetadata, and returns the JSON-stringified result as tool response.case 'getAssetMetadata': { const assetPath = args.assetPath; const result = await aemConnector.getAssetMetadata(assetPath); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
- dist/mcp-server.js:222-228 (registration)Registers the 'getAssetMetadata' tool in the MCP server's tools list, including name, description, and input schema requiring 'assetPath' string parameter.name: 'getAssetMetadata', description: 'Get asset metadata', inputSchema: { type: 'object', properties: { assetPath: { type: 'string' } }, required: ['assetPath'], },
- Core implementation of getAssetMetadata in AssetOperations class. Fetches asset data via HTTP GET to `{assetPath}.json`, extracts metadata, and returns formatted success response.async getAssetMetadata(assetPath) { return safeExecute(async () => { const response = await this.httpClient.get(`${assetPath}.json`); const metadata = response.data['jcr:content']?.metadata || {}; return createSuccessResponse({ assetPath, metadata, fullData: response.data, }, 'getAssetMetadata'); }, 'getAssetMetadata'); }
- src/mcp-handler.ts:51-52 (handler)Handler case in MCPRequestHandler class for 'getAssetMetadata', delegating to AEMConnector.case 'getAssetMetadata': return await this.aemConnector.getAssetMetadata(params.assetPath);
- src/aem-connector-new.ts:161-162 (helper)Delegation method in AEMConnector class that forwards getAssetMetadata call to the AssetOperations instance (assetOps).async getAssetMetadata(assetPath: string) { return this.assetOps.getAssetMetadata(assetPath);