getNodeContent
Retrieve content from Adobe Experience Manager JCR nodes by specifying a path and optional depth for structured data extraction.
Instructions
Legacy: Get JCR node content
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| depth | No |
Implementation Reference
- Core implementation of getNodeContent: fetches raw JCR node content via AEM's .json endpoint with optional depth parameter, wraps in structured response with timestamp.async getNodeContent(path: string, depth = 1): Promise<NodeContentResponse> { return safeExecute<NodeContentResponse>(async () => { const response = await this.httpClient.get(`${path}.json`, { params: { ':depth': depth.toString() } }); return { path, depth, content: response.data, timestamp: new Date().toISOString() }; }, 'getNodeContent'); }
- src/mcp-server.ts:664-667 (handler)MCP CallToolRequestSchema handler: extracts path and depth from tool arguments, invokes AEMConnector.getNodeContent, serializes result as JSON text content.case 'getNodeContent': { const { path, depth } = args as { path: string; depth: number }; const result = await aemConnector.getNodeContent(path, depth); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
- src/mcp-server.ts:176-187 (schema)Tool definition in MCP tools list: registers getNodeContent with description and input schema (path required string, depth optional number).{ name: 'getNodeContent', description: 'Legacy: Get JCR node content', inputSchema: { type: 'object', properties: { path: { type: 'string' }, depth: { type: 'number' }, }, required: ['path'], }, },
- src/interfaces/index.ts:631-636 (schema)TypeScript interface defining the NodeContentResponse returned by getNodeContent.export interface NodeContentResponse { path: string; depth: number; content: Record<string, unknown>; timestamp: string; }
- src/aem-connector-new.ts:197-199 (helper)Delegation method in AEMConnector that forwards to UtilityOperations.getNodeContent.async getNodeContent(path: string, depth?: number) { return this.utilityOps.getNodeContent(path, depth); }