Skip to main content
Glama

aem_bundle_status

Check OSGi bundle status on Adobe Experience Manager instances to monitor health and identify issues with specific bundles or the overall system.

Instructions

Check OSGi bundle status

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bundleIdNoSpecific bundle ID or symbolic name (optional)
hostNoAEM host (default: localhost)localhost
portNoAEM port (default: 4502)
usernameNoAEM username (default: admin)admin
passwordNoAEM password (default: admin)admin

Implementation Reference

  • MCP tool handler function that processes input arguments, calls the AEMClient to fetch bundle status, formats the response with summaries and details, and returns MCP-formatted content.
      async getBundleStatus(args: any) {
        const config = this.getConfig(args);
        const { bundleId } = args;
    
        const result = await this.aemClient.getBundleStatus(config, bundleId);
        
        let bundleText = `OSGi Bundle Status:
    ${bundleId ? `Bundle ID: ${bundleId}` : 'All Bundles'}
    Success: ${result.success}
    `;
    
        if (result.success && result.bundles) {
          if (bundleId) {
            // Single bundle
            bundleText += `Bundle Details:\n${JSON.stringify(result.bundles, null, 2)}`;
          } else {
            // All bundles summary
            const bundles = result.bundles;
            if (bundles.s && Array.isArray(bundles.s)) {
              const totalBundles = bundles.s.length;
              const activeBundles = bundles.s.filter((bundle: any) => bundle.state === 'Active').length;
              const resolvedBundles = bundles.s.filter((bundle: any) => bundle.state === 'Resolved').length;
              const installedBundles = bundles.s.filter((bundle: any) => bundle.state === 'Installed').length;
              
              bundleText += `Total Bundles: ${totalBundles}
    Active Bundles: ${activeBundles}
    Resolved Bundles: ${resolvedBundles}
    Installed Bundles: ${installedBundles}
    
    Bundle Summary:
    ${bundles.s.slice(0, 10).map((bundle: any) => 
      `- ${bundle.name} (${bundle.symbolicName}): ${bundle.state}`
    ).join('\n')}
    ${totalBundles > 10 ? `\n... and ${totalBundles - 10} more bundles` : ''}`;
            } else {
              bundleText += `Bundle Data:\n${JSON.stringify(bundles, null, 2)}`;
            }
          }
        } else {
          bundleText += `Message: ${result.message || 'Failed to get bundle status'}`;
        }
        
        return {
          content: [
            {
              type: 'text',
              text: bundleText,
            },
          ],
        };
      }
  • Input schema definition for the aem_bundle_status tool, including optional bundleId and AEM connection parameters.
    {
      name: 'aem_bundle_status',
      description: 'Check OSGi bundle status',
      inputSchema: {
        type: 'object',
        properties: {
          bundleId: {
            type: 'string',
            description: 'Specific bundle ID or symbolic name (optional)'
          },
          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:365-366 (registration)
    Tool registration in the MCP CallToolRequest handler switch statement, dispatching to the AEMTools.getBundleStatus method.
    case 'aem_bundle_status':
      return await this.aemTools.getBundleStatus(args);
  • Core helper function in AEMClient that performs HTTP request to AEM's OSGi console to retrieve bundle status (all or specific bundle), handles authentication and errors.
    async getBundleStatus(config: AEMConfig, bundleId?: string): Promise<any> {
      const baseUrl = this.getBaseUrl(config);
      const authHeader = this.getAuthHeader(config);
    
      try {
        const url = bundleId 
          ? `${baseUrl}/system/console/bundles/${bundleId}.json`
          : `${baseUrl}/system/console/bundles.json`;
    
        const response = await this.axiosInstance.get(url, {
          headers: {
            'Authorization': authHeader,
          },
        });
    
        if (response.status === 200) {
          return {
            success: true,
            bundles: response.data,
          };
        } else {
          return {
            success: false,
            message: `Failed to get bundle status: HTTP ${response.status}`,
          };
        }
      } catch (error) {
        throw new Error(`Failed to get bundle status: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It states 'Check' which implies a read-only operation, but doesn't disclose behavioral traits like authentication needs (implied by parameters but not described), rate limits, error handling, or what specific status information is returned. This is inadequate for a tool with connection parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero waste. It's appropriately sized and front-loaded, directly stating the tool's purpose without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (involving AEM connectivity and OSGi bundle checks), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'status' entails, return formats, or error scenarios, leaving significant gaps for an AI agent to use it effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents all 5 parameters. The description adds no additional meaning beyond the schema, such as explaining the bundleId's optional nature or the implications of default credentials. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Check') and resource ('OSGi bundle status'), providing a specific purpose. However, it doesn't differentiate from sibling tools like 'aem_status' which might also provide status information, so it doesn't reach the highest score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'aem_status' or other AEM monitoring tools. There's no mention of prerequisites, timing, or comparative context with siblings, leaving usage decisions ambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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