Skip to main content
Glama

aem_list_packages

List installed packages in Adobe Experience Manager to manage content bundles and track deployments.

Instructions

List installed packages in AEM

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

  • Handler function that executes the aem_list_packages tool logic: extracts config, calls AEMClient.listPackages, formats the response as MCP content.
    async listPackages(args: any) {
      const config = this.getConfig(args);
      const result = await this.aemClient.listPackages(config);
      
      let packagesText = 'Installed Packages:\n';
      
      if (result.success && result.packages) {
        if (typeof result.packages === 'string') {
          // Parse HTML response if needed
          packagesText += result.packages;
        } else {
          packagesText += JSON.stringify(result.packages, null, 2);
        }
      } else {
        packagesText += result.message || 'Failed to retrieve packages';
      }
      
      return {
        content: [
          {
            type: 'text',
            text: packagesText,
          },
        ],
      };
  • Input schema and metadata for the aem_list_packages tool, provided in the ListToolsRequestSchema response.
    {
      name: 'aem_list_packages',
      description: 'List installed packages in AEM',
      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:357-358 (registration)
    Registration of the tool handler in the CallToolRequestSchema switch statement, dispatching to AEMTools.listPackages.
    case 'aem_list_packages':
      return await this.aemTools.listPackages(args);
  • Helper method in AEMClient that performs the actual HTTP request to retrieve the list of installed packages from AEM's package manager.
    async listPackages(config: AEMConfig): Promise<any> {
      const baseUrl = this.getBaseUrl(config);
      const authHeader = this.getAuthHeader(config);
    
      try {
        const response = await this.axiosInstance.get(`${baseUrl}/crx/packmgr/list.jsp`, {
          headers: {
            'Authorization': authHeader,
          },
        });
    
        if (response.status === 200) {
          return {
            success: true,
            packages: response.data,
          };
        } else {
          return {
            success: false,
            message: `Failed to list packages: HTTP ${response.status}`,
          };
        }
      } catch (error) {
        throw new Error(`Failed to list packages: ${error instanceof Error ? error.message : 'Unknown error'}`);
      }
  • Shared helper method to extract and default 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',
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states it's a list operation, implying read-only behavior, but doesn't mention any side effects, authentication requirements beyond what's in the schema, rate limits, or output format. For a tool with 4 parameters and no annotations, this leaves significant gaps in understanding its behavior.

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 that directly states the tool's purpose without any unnecessary words. It's appropriately sized and front-loaded, making it easy to understand at a glance.

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

Completeness3/5

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

Given the tool's moderate complexity (4 parameters, no output schema, no annotations), the description is minimal but covers the basic purpose. However, it lacks details on behavioral traits, usage context, and output expectations, making it incomplete for fully informed tool selection. It meets the minimum viable standard but has clear gaps.

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?

The input schema has 100% description coverage, clearly documenting all 4 parameters with defaults and purposes. The description doesn't add any additional meaning beyond what the schema provides, such as explaining how parameters interact or providing usage examples. With high schema coverage, the baseline score of 3 is appropriate.

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 action ('List') and resource ('installed packages in AEM'), making the purpose immediately understandable. However, it doesn't differentiate from sibling tools like 'aem_query_content' or 'aem_status' that might also involve listing or checking AEM components, 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. There are sibling tools like 'aem_install_package' or 'aem_query_content' that might be relevant for related tasks, but the description doesn't mention any context, prerequisites, or exclusions for usage.

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