Skip to main content
Glama

Open a Twine game

open_game

Start playing or testing a Twine/interactive-fiction game by loading a local HTML file, folder, or URL and receiving the first passage and choices.

Instructions

Open a Twine / interactive-fiction HTML game and return the first observation (passage text, numbered choices, inputs, dialog). Accepts a local .html file, a game folder (index.html or a single html is picked), or an http(s) URL. Local games are served over 127.0.0.1 so saves work. Returns a formatted text observation (string); pass format:"json" for a JSON string. Inputs are listed in windows of 40 (see inputs_offset/inputs_limit on observe) and find_ui(text) locates any control by label.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoSeed SugarCube PRNG (State.prng) for reproducible runs; game must use SugarCube randomness to be deterministic.
formatNoOutput format: "text" (default, human-readable) or "json" (JSON string for programmatic use).
sourceYesPath to an .html file or folder, or an http(s) URL.
headlessNoRun browser headless (default true). Set false ONLY when the user explicitly asks to watch a real browser window — and then do not also open a live_view for the same game.
block_trackersNoBlock analytics/tracker requests for a quiet session (default true).
wait_timeout_msNoHow long to wait for the game to settle after load (default 20000).
include_variablesNoEmbed the (truncated) story variables in the observation (default false; prefer get_variables for specific keys).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.3

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does reasonably well: it discloses the return shape ('formatted text observation (string); pass format:"json" for a JSON string'), the fact that local games are served on 127.0.0.1 to enable saves, and that inputs are windowed in groups of 40. It omits session/lifecycle behavior (e.g., whether a prior game must be closed first) and error behavior on bad sources, so it is strong but not exhaustive.

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?

Purpose and return value are front-loaded in the first clause, which is the most important information. The trailing sentence about 40-item input windows and find_ui is useful routing but sits awkwardly at the end and slightly dilutes the core message about opening a game.

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 7-parameter entry-point tool with no output schema, the description covers the essentials: accepted sources, the returned observation and its two formats, and where to look for UI controls. It leaves unstated what happens on a failed load or whether close_game must precede a re-open, which keeps it from being fully complete.

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 all seven parameters (seed, format, source, headless, block_trackers, wait_timeout_ms, include_variables). The description restates the format parameter and references inputs_offset/inputs_limit from observe, adding only marginal meaning beyond the structured fields. Baseline 3 is correct.

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?

The description opens with a specific verb + resource ('Open a Twine / interactive-fiction HTML game') and states the immediate consequence ('return the first observation'), which separates it cleanly from list_games, close_game, restart and observe. It also names the accepted source kinds, so the agent knows exactly what this tool consumes versus its siblings.

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?

It gives clear context for when the tool applies (local .html file, folder with index.html, or http(s) URL) and notes that local games are served over 127.0.0.1 so saves work. It does not explicitly exclude anything or say when to prefer a sibling (e.g., list_games first to find a source), so it falls short of the 5-level 'when-not/alternatives' bar.

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