Skip to main content
Glama

fetchLanguageMasters

Retrieve language masters for a specific site using the AEM MCP Server's REST/JSON-RPC API, enabling streamlined content and asset management for multilingual sites.

Instructions

Get language masters for a specific site

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
siteYes

Implementation Reference

  • Core handler implementation: Fetches AEM content tree for the site with depth 3, parses direct children as language masters, extracts metadata, wraps in success response.
    async fetchLanguageMasters(site) { return safeExecute(async () => { const response = await this.httpClient.get(`/content/${site}.json`, { params: { ':depth': '3' } }); const masters = []; Object.entries(response.data).forEach(([key, value]) => { 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'); }, 'fetchLanguageMasters'); }
  • Input schema definition for the tool, specifying 'site' as required string parameter.
    name: 'fetchLanguageMasters', description: 'Get language masters for a specific site', inputSchema: { type: 'object', properties: { site: { type: 'string' } }, required: ['site'], }, },
  • Tool dispatch/registration in MCP server switch statement, extracts 'site' from args and calls aemConnector.
    case 'fetchLanguageMasters': { const site = args.site; const result = await aemConnector.fetchLanguageMasters(site); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; }
  • AEM Connector wrapper/delegation to utility operations handler.
    async fetchLanguageMasters(site) { return this.utilityOps.fetchLanguageMasters(site);
  • TypeScript interface definition for the method signature and response type.
    fetchLanguageMasters(site: string): Promise<LanguageMastersResponse>;

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