aia_add_event_handlers
Add event handlers to App Inventor screens without altering existing blocks. Set component properties or open new screens when events like button clicks occur.
Instructions
Generate and append event handlers (e.g. 'when Button.Click do...') to a screen's blocks without touching existing ones. Each action is either {set, component, componentType, to} to set a property or {openScreen} to switch screens.
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": {
"path": "<path>",
"screen_name": "<screen_name>",
"events": "<events>"
},
"name": "aia_add_event_handlers"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute or relative path to an .aia file | |
| events | Yes | ||
| screen_name | Yes |