Skip to main content
Glama

dhis2_get_composition_recommendations

Generate integration recommendations for connecting DHIS2 operation results with other MCP servers to enhance data workflows.

Instructions

Get recommendations for integrating the result of the last operation with other MCP servers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
lastToolNoName of the last tool that was executed

Implementation Reference

  • Handler for 'dhis2_get_composition_recommendations' tool. Extracts 'lastTool' parameter, calls MultiServerComposition.getCompositionRecommendations, logs audit, and formats response with recommendations and server info.
    case 'dhis2_get_composition_recommendations': const { lastTool } = args as { lastTool?: string }; const recommendations = multiServerComposition.getCompositionRecommendations( lastTool || 'dhis2_general', {} ); auditLogger.log({ toolName: name, parameters: { lastTool }, outcome: 'success', dhis2Instance: dhis2Client?.baseURL, userId: currentUser?.username, executionTime: Date.now() - startTime }); return { content: [{ type: 'text', text: `šŸ’” Multi-Server Integration Recommendations ${lastTool ? `**Based on your last operation:** ${lastTool}` : '**General Recommendations:**'} **Suggested Next Steps:** ${recommendations.length > 0 ? recommendations.map(rec => ` • ${rec}`).join('\n') : ' • No specific recommendations for this operation' } **Available Compatible Servers:** ${multiServerComposition.getCompatibleServers().length} ${multiServerComposition.getCompatibleServers().map(server => ` • **${server.name}**: ${server.capabilities.map(c => c.domain).join(', ')}` ).join('\n') || ' • Register servers with dhis2_register_compatible_server'} **Common Integration Patterns:** • **Data Quality**: DHIS2 validation → GitHub issues → Slack notifications • **Development**: DHIS2 app generation → Git commits → Pull requests • **Analytics**: DHIS2 reports → Database storage → Email distribution • **Monitoring**: DHIS2 system info → Log aggregation → Alert systems šŸ”— Use **dhis2_export_for_composition** to prepare data for other servers.` }] };
  • Core helper method that generates array of string recommendations based on the currentTool name, matching keywords like 'validation', 'init_webapp', etc., to suggest next integration steps.
    getCompositionRecommendations(currentTool: string, result: any): string[] { const recommendations: string[] = []; // Analysis of current tool and suggest next steps if (currentTool.includes('validation')) { recommendations.push('Create GitHub issue for validation failures'); recommendations.push('Send Slack notification to data team'); recommendations.push('Log validation results to database'); } if (currentTool.includes('init_webapp')) { recommendations.push('Commit generated code to Git repository'); recommendations.push('Create GitHub pull request'); recommendations.push('Notify development team via Slack'); } if (currentTool.includes('get_analytics')) { recommendations.push('Export analytics data to external database'); recommendations.push('Generate and email automated report'); recommendations.push('Create dashboard visualization'); } if (currentTool.includes('create_data_element')) { recommendations.push('Backup metadata to version control'); recommendations.push('Update documentation in Wiki/GitHub'); recommendations.push('Notify configuration team'); } return recommendations;
  • src/index.ts:104-110 (registration)
    Tool list handler that returns available tools filtered by permissions. The composition tools are handled dynamically via switch cases in CallToolRequestSchema.
    server.setRequestHandler(ListToolsRequestSchema, async () => { // Filter tools based on user permissions const filteredTools = PermissionSystem.filterToolsByPermissions(tools, userPermissions); return { tools: filteredTools, };
  • Instantiation of MultiServerComposition class instance used by composition tools including getCompositionRecommendations.
    let multiServerComposition: MultiServerComposition = new MultiServerComposition();

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