Skip to main content
Glama
SirHumza

App Inventor MCP

by SirHumza

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesAbsolute or relative path to an .aia file
eventsYes
screen_nameYes
Behavior3/5

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

With no annotations, the description carries the full burden of behavioral disclosure. It discloses that it appends rather than overwrites, and it describes the two supported actions: setting a property or opening a screen. It does not mention duplicate event handling, in-place file modification, validation failures, or other side effects, so some behavior remains opaque.

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 compact and front-loaded with the tool's exact purpose, followed by a dense summary of action shapes. It is not overly long, but the second sentence is technical and packed, sacrificing a little readability. No wasted words overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with nested schema objects and no annotations, the description should clarify how to construct an event handler and what happens if an event already exists or an action is invalid. The example 'when Button.Click do...' helps, but the agent may still struggle to shape the events argument reliably without additional 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?

The schema description coverage is only 33%, so the description does important work by explaining the action shapes: {set, component, componentType, to} and {openScreen}. However, it does not clearly map those actions to the actual `events` array structure or clarify `screen_name` and whether the events are keyed by component and event. Some inference is still required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description specifies the verb (generate and append), the target resource (screen's blocks), and the artifact (event handlers). It also signals non-destructive behavior with 'without touching existing ones', which differentiates it from sibling tools like aia_set_blocks. However, it does not explicitly name the sibling or contrast with it, so it is clear but not maximally differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The 'append' language and 'without touching existing ones' imply that this tool is the right choice when the agent wants to add new event handlers while retaining existing blocks, rather than replacing them. Yet the description does not explicitly state when to use this tool versus alternatives, nor does it mention any conditions or exclusions.

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/SirHumza/app-inventor-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server