Skip to main content
Glama

aem_status

Check the status of Adobe Experience Manager instances to verify connectivity and operational state using host, port, and authentication parameters.

Instructions

Check the status of AEM instance

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostNoAEM host (default: localhost)localhost
portNoAEM port (default: 4502)
usernameNoAEM username (default: admin)admin
passwordNoAEM password (default: admin)admin

Implementation Reference

  • The main handler function for the 'aem_status' tool. It extracts configuration from input arguments, calls the AEMClient to check the instance status, and returns a formatted text response.
    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/index.ts:48-76 (registration)
    Registers the 'aem_status' tool in the MCP server's ListTools response, providing name, description, and input schema.
    { 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' } } } },
  • Input schema definition for the 'aem_status' tool, specifying optional parameters for AEM connection with defaults.
    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' } } }
  • Helper method to extract and provide default values for AEM configuration from tool arguments.
    private getConfig(args: any): AEMConfig { return { host: args.host || 'localhost', port: args.port || 4506, username: args.username || 'admin', password: args.password || 'admin', }; }
  • Core helper implementing the AEM status check via HTTP request to bundles endpoint, computing bundle counts and status, asynchronously fetching 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', }; } }

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/pradeep-moolemane/aem-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server