Skip to main content
Glama

android_generate_bottom_sheet

Create Android bottom sheet components in Compose for DHIS2 mobile apps. Specify component name and persistent sheet options to generate UI elements for data display and user interactions.

Instructions

Generate Android bottom sheet component (Compose)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
componentNameNoComposable name
persistentNoGenerate persistent bottom sheet alternative

Implementation Reference

  • The MCP tool handler for 'android_generate_bottom_sheet'. It extracts arguments, calls the generateAndroidBottomSheet helper function, and returns the generated Kotlin code as text content.
    case 'android_generate_bottom_sheet': const aSheetArgs = args as any; const aSheet = generateAndroidBottomSheet(aSheetArgs); return { content: [{ type: 'text', text: aSheet }] };
  • The supporting utility function that generates a markdown document containing Kotlin Jetpack Compose code for a customizable ModalBottomSheet component.
    export function generateAndroidBottomSheet(args: any): string { const { componentName = 'DetailsBottomSheet' } = args; return `# Android Bottom Sheet (Compose): ${componentName} ## Implementation \`\`\`kotlin @OptIn(ExperimentalMaterial3Api::class) @Composable fun ${componentName}(open: Boolean, onDismiss: () -> Unit, content: @Composable () -> Unit) { if (!open) return ModalBottomSheet(onDismissRequest = onDismiss) { content() } } \`\`\` `;
  • The tool is registered in the TOOL_PERMISSIONS map, requiring 'canUseMobileFeatures' permission for access control.
    ['android_generate_bottom_sheet', 'canUseMobileFeatures'], ]);
  • Import statement in index.ts that brings the generateAndroidBottomSheet function into scope for use by the tool handler.
    generateTestSetup } from './webapp-generators.js';

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