Skip to main content
Glama

fetchLanguageMasters

Retrieve language masters for Adobe Experience Manager sites to manage multilingual content efficiently.

Instructions

Get language masters for a specific site

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteYes

Implementation Reference

  • Core handler implementing the tool logic: queries AEM site JSON endpoint at depth 3, filters child nodes with jcr:content as language masters, structures response.
    async fetchLanguageMasters(site: string): Promise<LanguageMastersResponse> {
      return safeExecute<LanguageMastersResponse>(async () => {
        const response = await this.httpClient.get(`/content/${site}.json`, { 
          params: { ':depth': '3' } 
        });
        
        const masters: Array<{
          name: string;
          path: string;
          title: string;
          language: string;
        }> = [];
    
        Object.entries(response.data).forEach(([key, value]: [string, any]) => {
          if (key.startsWith('jcr:') || key.startsWith('sling:')) return;
          if (value && typeof value === 'object' && value['jcr:content']) {
            masters.push({
              name: key,
              path: `/content/${key}`,
              title: value['jcr:content']['jcr:title'] || key,
              language: value['jcr:content']['jcr:language'] || 'en',
            });
          }
        });
    
        return createSuccessResponse({
          site,
          languageMasters: masters,
        }, 'fetchLanguageMasters') as LanguageMastersResponse;
      }, 'fetchLanguageMasters');
    }
  • MCP tool registration in server tools array, defining name, description, and input schema (object with required 'site' string property).
    {
      name: 'fetchLanguageMasters',
      description: 'Get language masters for a specific site',
      inputSchema: {
        type: 'object',
        properties: { site: { type: 'string' } },
        required: ['site'],
      },
    },
  • TypeScript interface defining the output structure LanguageMastersResponse, used for type safety and validation.
    export interface LanguageMastersResponse extends BaseResponse {
      data: {
        site: string;
        languageMasters: Array<{
          name: string;
          path: string;
          title: string;
          language: string;
        }>;
      };
    }
  • MCP server request handler switch case that processes tool calls to fetchLanguageMasters by extracting site param and delegating to AEM connector.
    case 'fetchLanguageMasters': {
      const site = (args as { site: string }).site;
      const result = await aemConnector.fetchLanguageMasters(site);
      return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] };
  • Registers the listTools handler returning the full tools array including fetchLanguageMasters.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return { tools };
    });
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. It states 'Get' which implies a read operation, but doesn't disclose behavioral traits like permissions needed, rate limits, pagination, or what 'language masters' entails (e.g., data format, size). This leaves significant gaps for a tool with no annotation coverage.

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 no wasted words. It's appropriately sized and front-loaded, making it easy to parse quickly.

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 no annotations, 0% schema coverage, and no output schema, the description is incomplete. It doesn't explain what 'language masters' are, the return format, or error handling, making it inadequate for a tool that likely retrieves complex data in a content management context.

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 0%, so the description must compensate. It mentions 'for a specific site', which adds meaning to the 'site' parameter by indicating it's required and site-specific. However, it doesn't explain the parameter's format, constraints, or examples, providing only basic context.

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

Purpose3/5

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

The description 'Get language masters for a specific site' clearly states the action ('Get') and resource ('language masters'), but it's vague about what 'language masters' are and doesn't distinguish this from sibling tools like 'fetchAvailableLocales' or 'fetchSites'. It provides basic purpose but lacks specificity.

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?

No guidance is provided on when to use this tool versus alternatives. With siblings like 'fetchAvailableLocales' and 'fetchSites', the description doesn't explain if this is for retrieving language-specific content, configurations, or other data, leaving usage unclear.

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/indrasishbanerjee/aem-mcp-server'

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