Skip to main content
Glama

dhis2_configure_build_system

Configure build system settings for DHIS2 applications, including entry points, PWA features, proxy setup, and custom authorities.

Instructions

Set up build system configuration for DHIS2 app (d2.config.js, webpack, etc.)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
appNameYesName of the application
entryPointsNo
customAuthoritiesNoCustom authorities required by the app
pwaNo
publicPathNoPublic path for assets (for CDN deployment)
proxyNo

Implementation Reference

  • The core handler function that executes the tool logic, generating comprehensive DHIS2 build system configuration including d2.config.js, build commands, proxy setup, PWA configuration, and environment variables.
    export function generateBuildSystemConfig(args: any): string { const { appName, entryPoints, customAuthorities, pwa, publicPath, proxy } = args; const d2Config = { type: 'app', name: appName, title: appName.split('-').map((word: string) => word.charAt(0).toUpperCase() + word.slice(1)).join(' '), ...(entryPoints && { entryPoints }), ...(customAuthorities && { authorities: customAuthorities }), ...(pwa && { pwa }), ...(publicPath && { publicPath }) }; return `# DHIS2 Build System Configuration ## d2.config.js \`\`\`javascript const config = ${JSON.stringify(d2Config, null, 2)}; module.exports = config; \`\`\` ## Build Commands \`\`\`bash # Development server yarn start # Production build yarn build # Deploy to DHIS2 instance yarn deploy # Build and analyze bundle yarn build --analyze \`\`\` ${proxy ? generateProxyConfig(proxy) : ''} ${pwa ? generatePWABuildConfig() : ''} ## Environment Configuration \`\`\`bash # .env.local REACT_APP_DHIS2_BASE_URL=https://your-dhis2-instance.com REACT_APP_DHIS2_API_VERSION=40 \`\`\` `; }
  • The main server request handler dispatch case that processes calls to the 'dhis2_configure_build_system' tool and invokes the generateBuildSystemConfig function with user arguments.
    case 'dhis2_configure_build_system': const buildSystemArgs = args as any; const buildConfig = generateBuildSystemConfig(buildSystemArgs); return { content: [ { type: 'text', text: buildConfig, }, ], };
  • Permission registration mapping the tool to the 'canConfigureApps' user permission in the TOOL_PERMISSIONS Map.
    ['dhis2_configure_build_system', 'canConfigureApps'],

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/Dradebo/dhis2-mcp'

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