Skip to main content
Glama

dhis2_export_for_composition

Export DHIS2 operation results in a format compatible with other MCP servers for data sharing and integration.

Instructions

Export the result of a DHIS2 operation in a format suitable for other MCP servers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toolNameYesName of the tool whose result should be exported
dataYesData to export (usually the result of a previous tool call)
targetServerNoTarget MCP server name (optional)
metadataNoAdditional metadata to include (optional)

Implementation Reference

  • Handler for the 'dhis2_export_for_composition' tool. Processes input arguments, calls multiServerComposition.exportDataForComposition to generate standardized export context, logs the operation, and returns formatted response with JSON export data.
          case 'dhis2_export_for_composition':
            const exportArgs = args as {
              toolName: string;
              data: any;
              targetServer?: string;
              metadata?: Record<string, any>;
            };
            
            const exportContext = multiServerComposition.exportDataForComposition(
              exportArgs.toolName,
              exportArgs.data,
              {
                targetServer: exportArgs.targetServer,
                ...exportArgs.metadata
              }
            );
            
            auditLogger.log({
              toolName: name,
              parameters: exportArgs,
              outcome: 'success',
              dhis2Instance: dhis2Client?.baseURL,
              userId: currentUser?.username,
              executionTime: Date.now() - startTime,
              resourcesAffected: [exportArgs.toolName]
            });
            
            return {
              content: [{
                type: 'text',
                text: `šŸ“¤ Data Exported for Multi-Server Composition
    
    **Export Details:**
      • Source Tool: ${exportArgs.toolName}
      • Timestamp: ${exportContext.timestamp}
      • Target Server: ${exportArgs.targetServer || 'Any compatible server'}
      • Operation Type: ${exportContext.operationType}
    
    **Standardized Export Format:**
    \`\`\`json
    ${JSON.stringify(exportContext, null, 2)}
    \`\`\`
    
    **Compatible Servers:** ${multiServerComposition.getCompatibleServers().map(s => s.name).join(', ') || 'None registered'}
    
    **Next Steps:**
      • Share this exported data with other MCP servers
      • Use the standardized format for workflow automation
      • Check server documentation for import procedures
    
    šŸ’” **Integration Tip:** This format is designed to work seamlessly with GitHub, Slack, Database, and other MCP servers.`
              }]
            };
  • Core helper function that creates a standardized CrossServerContext object for exporting DHIS2 tool results to other MCP servers in composition mode.
    exportDataForComposition(toolName: string, result: any, metadata: Record<string, any> = {}): CrossServerContext {
      return this.createCrossServerContext(
        this.serverInfo.name,
        result,
        'export',
        { toolName, ...metadata }
      );
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions exporting for other MCP servers but fails to describe critical traits like whether this is a read-only or destructive operation, authentication needs, rate limits, or what the export format entails. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary details. It's appropriately sized and front-loaded, though it could be slightly more informative without sacrificing brevity.

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 the tool's complexity (4 parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain the export format, return values, or behavioral aspects, making it inadequate for an agent to fully understand how to use this tool effectively in 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 100%, so the schema already documents all parameters (toolName, data, targetServer, metadata). The description adds no additional meaning beyond the schema, such as examples or context for how parameters interact, resulting in a baseline score of 3.

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 states the tool exports DHIS2 operation results for other MCP servers, which clarifies the verb (export) and resource (DHIS2 operation results). However, it's vague about what 'suitable for other MCP servers' means and doesn't differentiate from sibling tools like dhis2_export_audit_log or dhis2_register_compatible_server, which also involve exports or server interactions.

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 is provided. The description implies usage for exporting data to other servers, but it doesn't specify prerequisites, exclusions, or compare to sibling tools, leaving the agent to infer context without clear direction.

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