android_generate_bottom_sheet
Create Android bottom sheet components (Compose) for user interfaces, including persistent bottom sheet alternatives. Simplify UI development for DHIS2 health information systems on the MCP Server.
Instructions
Generate Android bottom sheet component (Compose)
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| componentName | No | Composable name | |
| persistent | No | Generate persistent bottom sheet alternative |
Implementation Reference
- src/permission-system.ts:177-177 (registration)Lists 'android_generate_bottom_sheet' in TOOL_PERMISSIONS map, requiring 'canUseMobileFeatures' permission for access control.['android_generate_bottom_sheet', 'canUseMobileFeatures'],
- src/index.ts:1122-1125 (handler)MCP server request handler for the tool. Receives arguments, calls generateAndroidBottomSheet, and returns generated markdown/code as response content.case 'android_generate_bottom_sheet': const aSheetArgs = args as any; const aSheet = generateAndroidBottomSheet(aSheetArgs); return { content: [{ type: 'text', text: aSheet }] };
- src/webapp-generators.ts:1847-1863 (helper)Generates Kotlin Jetpack Compose code snippet for a Material Design 3 ModalBottomSheet component, customizable by componentName argument.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() } } \`\`\` `;