Skip to main content
Glama

Fill an input or press a key

interact

Set a value on a Twine input, textarea, select, radio, or checkbox by ref, or press a keyboard key, then get the updated observation.

Instructions

Interact with input fields or the keyboard: set a value on an input/textarea/select by ref, or press a key (e.g. "Enter", "ArrowUp"). For radios/checkboxes pass value "true" or "false". Inputs are refs from the last observation (or find_ui). Returns the new observation; pass format:"json" for a JSON string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoKeyboard key to press, e.g. "Enter", "a", "ArrowDown".
refNoInput ref from the last observation (e.g. "i1"). Optional when only pressing a key.
valueNoValue to set on the input/select. Radios/checkboxes: "true" or "false".
formatNoOutput format: "text" (default, human-readable) or "json" (JSON string for programmatic use).
game_idYesSession id returned by open_game.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A3.9/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose the return value (new observation) and the format:"json" option, which is genuinely useful. However, it never states that this mutates page/form state, whether it submits the form, or what happens on an invalid ref/key – notable gaps for a write-side tool with zero annotation coverage.

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?

Three tight sentences, front-loaded with the two primary modes before edge cases and return behavior. No padding, though the radio/checkbox note somewhat duplicates the schema.

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 mutation tool with 5 params and no output schema, the description covers usage mechanics, ref sourcing, an edge case, and the return format. It stops short of error/auth behavior, but an agent has enough to invoke it 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 all five parameters are already documented in the schema. The description largely restates schema content (key examples, radio/checkbox "true"/"false", ref sourcing from observation/find_ui) rather than adding new semantics. Baseline 3 is appropriate when the schema does the heavy lifting.

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 with two clearly enumerated modes: set a value on an input/textarea/select by ref, or press a key. This distinguishes it from siblings like click_ui (clicking), choose (selection panels), and find_ui (locating refs) without the agent needing to open schemas.

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?

Gives clear context: inputs are refs from the last observation or find_ui, and it explains the radio/checkbox special case (pass "true"/"false"). It does not state when NOT to use this tool (e.g. vs click_ui for buttons, or choose for option lists), so there is no explicit alternative routing.

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