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'],
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 'Set up' which implies a write/mutation operation, but doesn't disclose behavioral traits like whether it overwrites existing configs, requires specific permissions, has side effects, or returns any output. For a configuration tool with 6 parameters, this is a significant gap.

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?

Single sentence, front-loaded with the core action and resource, with illustrative examples in parentheses. Zero wasted words, efficiently conveys the essence without redundancy.

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?

For a configuration tool with 6 parameters, 50% schema coverage, no annotations, and no output schema, the description is inadequate. It doesn't explain what 'Set up' entails operationally, what happens on execution, or how parameters interact. The context demands more detail about behavior and outcomes.

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 50%, so the description must compensate but only mentions general configuration areas without detailing specific parameters. It lists examples (d2.config.js, webpack) which loosely map to some schema properties, but doesn't explain parameter meanings, relationships, or usage beyond what the schema provides. Baseline 3 is appropriate given partial schema coverage.

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 ('Set up') and target resource ('build system configuration for DHIS2 app'), with specific examples (d2.config.js, webpack). It distinguishes from most siblings focused on Android or other domains, though not from dhis2_configure_app_manifest or dhis2_init_webapp which are related but not identical.

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 explicit guidance on when to use this tool versus alternatives like dhis2_configure_app_manifest or dhis2_init_webapp. The description implies it's for initial configuration but doesn't specify prerequisites, timing, or exclusions. Usage is implied by the action but not clearly defined.

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

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