Skip to main content
Glama
mitsuru

A2UI MCP Server

by mitsuru

Poll A2UI Events

a2ui_poll_events

Retrieve and consume browser UI events like button clicks and text changes to react to user interactions. Use peek to inspect events without removing them.

Instructions

Poll for UI events from the browser (button clicks, text input, etc.).

Events are consumed when polled (unless peek=true). Use this to react to user interactions.

Event types:

  • tap: Button was clicked (payload: { action?: string })

  • change: TextField value changed (payload: { value: string, dataBinding?: string })

Example response: [ { "eventId": "abc-123", "surfaceId": "my_form", "componentId": "submit_btn", "eventType": "tap", "timestamp": 1234567890, "payload": { "action": "submit" } } ]

To enable events on components, set onTap=true (Button) or onChange=true (TextField).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
peekNoIf true, peek at events without consuming them
surface_idNoFilter events by surface ID (optional, returns all if not specified)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Discloses critical behavior beyond the annotations: events are consumed when polled unless peek=true, event payload structures are detailed, and a full example response shows the return shape. The annotations only set all hints to false, so the description carries the full transparency burden and does it well.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is front-loaded with a purpose statement, uses terse bullet lists for event types, and includes a compact example response. Every line adds value—event types, payloads, and the enabling flag—with no fluff or redundancy.

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

Completeness4/5

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

For a tool with no output schema, the description supplies a representative response and covers the main operational details: peek semantics, event consumption, payloads, and how to enable events. It stops short of edge cases like empty-response behavior or whether polling is blocking, but it is otherwise adequately complete for an agent to invoke correctly.

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?

Schema description coverage is 100%, so the schema already documents both parameters (peek and surface_id). The description's mention of peek=true adds narrative context but no new parameter semantics beyond what the schema provides, so a baseline of 3 is appropriate.

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

Purpose5/5

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

States explicitly that the tool polls UI events from the browser with a specific verb and resource, and enumerates concrete event types (tap, change) with payloads. This is clearly distinct from sibling tools like a2ui_get_state or a2ui_update_components, which handle state and component mutations rather than event streaming.

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

Usage Guidelines4/5

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

Provides an explicit use case ('Use this to react to user interactions') and prerequisite setup guidance (set onTap=true or onChange=true). It does not name alternatives or when-not-to-use conditions, but no sibling tool fills the same role, so the context is sufficient for an agent to choose it correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.