Skip to main content
Glama

Button events

get_button_events

Poll button presses since the last call and current held states to let AI agents react to simulator button input.

Instructions

Button presses since the last call (oldest first, then cleared): { id, name, press: "short" | "long", seconds, at (ms epoch) }, plus every button and whether it is held right now. People press buttons in the simulator page; poll this to react to them.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.1

TDQS

A4.6/5.0
Behavior5/5

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

The description explains the trait that matters most and that the annotations only hint at: the event buffer is drained on read ("since the last call ... then cleared"), which is exactly why readOnlyHint=false despite being a getter. It also discloses ordering (oldest first) and the exact record shape including the short/long enum and ms-epoch timestamp.

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?

Two sentences, no filler, and the payload shape is stated compactly with an inline schema. The one weakness is ordering: the return structure comes before the purpose sentence, so the agent reads the format before learning why it should call the tool.

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

Completeness5/5

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

There is no output schema, so the description must carry the return contract — and it does, listing every field and its type. Combined with the polling/clearing semantics, an agent has everything needed to call and consume this tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so there is nothing to disambiguate; baseline 4 applies. The description instead spends its words on the return payload, which is the useful place for detail here.

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 a specific verb+resource: retrieves button press events since the last call, plus current held state. This is clearly distinguishable from the sibling press_button (which injects a press) and from get_observation/read_sensors, so an agent can select it without opening a schema.

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?

"People press buttons in the simulator page; poll this to react to them" gives a clear use condition — polling to react to human input in the simulator. It stops short of naming an alternative or an exclusion (e.g., when not to poll, or how it relates to press_button), but the context is unambiguous.

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