Scaffold Activity
scaffold_activityGenerates a new Kotlin Activity file from a template and adds it to an existing Android project, optionally creating the matching XML layout.
Instructions
Generate a new Activity Kotlin file from a template and add it to an existing Android project
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectDir": "<projectDir>",
"activityName": "<activityName>",
"packageName": "<packageName>"
},
"name": "scaffold_activity"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| layout | No | Generate a corresponding XML layout file | |
| module | No | Module name | app |
| projectDir | Yes | Absolute path to the Android project root | |
| packageName | Yes | Package name, e.g. 'com.example.myapp' | |
| activityName | Yes | Activity class name, e.g. 'DetailActivity' |