Ask the story engine directly
engineReads Twine engine state such as passage, turns, visited passages, and variable values without re-rendering the page, so agents can inspect progress and story variables using minimal tokens.
Instructions
Read engine state without re-rendering the page: passage, turns, variable count, visited passages, or specific variable paths. ~160 bytes where an observation costs ~1.5 KB. SugarCube, Chapbook and Snowman; Harlowe reports unsupported.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "engine"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | With include:"actions": how many to return (default 20). | |
| paths | No | With include:"paths": dot paths like "player.hp" or "coins". | |
| game_id | No | Session id from open_game. Omit when a single game is open. | |
| include | No | summary (default): passage/turns/counts. paths: read the paths you name. visited: passages the engine says you reached. actions: what this session did. |