aem_status
Monitor the health and operational status of Adobe Experience Manager instances by specifying host, port, username, and password for accurate diagnostics and maintenance.
Instructions
Check the status of AEM instance
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| host | No | AEM host (default: localhost) | localhost |
| password | No | AEM password (default: admin) | admin |
| port | No | AEM port (default: 4502) | |
| username | No | AEM username (default: admin) | admin |
Implementation Reference
- src/aem-tools.ts:15-33 (handler)AEMTools.checkStatus: Main handler for 'aem_status' tool. Extracts config from args, calls AEMClient.checkStatus, and formats the response as MCP content block.async checkStatus(args: any) { const config = this.getConfig(args); const status = await this.aemClient.checkStatus(config); return { content: [ { type: 'text', text: `AEM Instance Status: Host: ${config.host}:${config.port} Status: ${status.status} ${status.version ? `Version: ${status.version}` : ''} ${status.totalBundles ? `Total Bundles: ${status.totalBundles}` : ''} ${status.activeBundles ? `Active Bundles: ${status.activeBundles}` : ''} ${status.message ? `Message: ${status.message}` : ''}`, }, ], }; }
- src/aem-client.ts:34-66 (handler)AEMClient.checkStatus: Core implementation performing HTTP GET to AEM's bundles.json endpoint to check instance status, bundle counts, and fetches version.async checkStatus(config: AEMConfig): Promise<any> { const baseUrl = this.getBaseUrl(config); const authHeader = this.getAuthHeader(config); try { const response = await this.axiosInstance.get(`${baseUrl}/system/console/bundles.json`, { headers: { 'Authorization': authHeader, }, }); if (response.status === 200) { const data = response.data; console.log('AEM Status Data:', data); return { status: 'running', totalBundles: data.s?.length || 0, activeBundles: data.s?.filter((bundle: any) => bundle.state === 'Active').length || 0, version: await this.getAEMVersion(config), }; } else { return { status: 'error', message: `HTTP ${response.status}: ${response.statusText}`, }; } } catch (error) { return { status: 'offline', message: error instanceof Error ? error.message : 'Unknown error', }; } }
- src/index.ts:52-75 (schema)Input schema definition for the 'aem_status' tool, specifying optional parameters for AEM connection details.type: 'object', properties: { host: { type: 'string', description: 'AEM host (default: localhost)', default: 'localhost' }, port: { type: 'number', description: 'AEM port (default: 4502)', default: 4502 }, username: { type: 'string', description: 'AEM username (default: admin)', default: 'admin' }, password: { type: 'string', description: 'AEM password (default: admin)', default: 'admin' } } }
- src/index.ts:48-76 (registration)Tool registration in ListToolsRequestSchema handler: defines name, description, and schema for 'aem_status'.{ name: 'aem_status', description: 'Check the status of AEM instance', inputSchema: { type: 'object', properties: { host: { type: 'string', description: 'AEM host (default: localhost)', default: 'localhost' }, port: { type: 'number', description: 'AEM port (default: 4502)', default: 4502 }, username: { type: 'string', description: 'AEM username (default: admin)', default: 'admin' }, password: { type: 'string', description: 'AEM password (default: admin)', default: 'admin' } } } },
- src/index.ts:353-354 (registration)Dispatch registration in CallToolRequestSchema switch statement, routing 'aem_status' calls to AEMTools.checkStatus.case 'aem_status': return await this.aemTools.checkStatus(args);