Skip to main content
Glama

craftos_expect

Waits for a ComputerCraft program to settle, checks screen, text, simulation, or waiting-state expectations, and returns pass/fail results with diagnostic evidence.

Instructions

Assert instead of look. Waits for the program to settle, checks the expectations and returns only {pass, failures}. A failure carries the reason and the closest things that do exist (nearest rectangles by colour, nearby text, the actual sim value), and the session saves PNGs plus a JSON dump to disk (evidence) that you open only if the text is not enough. Costs a few lines; prefer it over craftos_ui when you know what you expect.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "id": "<id>",
      "expect": "<expect>"
    },
    "name": "craftos_expect"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesId returned by craftos_session_create.
expectYes
settleNo
waitMsNoKeep re-checking for this long before failing: games animate with timers, so a screen can be still between frames.
evidenceNo
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.7.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare openWorldHint=false and destructiveHint=false, so the description carries most of the burden and does so well: it discloses the settle-then-check wait behavior, the exact return shape {pass, failures}, what a failure payload contains (reason, nearest rectangles by colour, nearby text, actual sim value), and an otherwise invisible disk side effect (PNG + JSON dump written to the session). It never contradicts the annotations, though it does not mention the timeout ceiling or that the write happens even on success.

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?

Front-loaded with the core contrast ("Assert instead of look") and packed with useful detail in four sentences. It is dense but every sentence adds information; "Costs a few lines" is a slightly unusual framing of token cost, yet it still earns its place as a selection hint.

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?

With no output schema, the description does the necessary work of specifying the return contract ({pass, failures} plus a failure reason and near-miss diagnostics) and the evidence artifacts. What remains thin is the timeout/polling envelope (timeoutMs default 15s) and the exact expectation object shape, both of which live only in the schema.

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 coverage is only 33%, so the description must compensate, and it partially does: it explains `settle` and `evidence` through behavior ("waits for the program to settle", "saves PNGs plus a JSON dump to disk (`evidence`)") and hints at the rect/text/sim expectation kinds via the failure payload. But `timeoutMs`, `id`, and the one-of rect/text/waiting/sim/changed constraint on `expect` are left entirely to the schema.

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?

"Assert instead of look" plus "waits for the program to settle, checks the expectations and returns only {pass, failures}" states a specific verb (assert/verify) and resource (program state) in one stroke. It is clearly distinguished from craftos_ui, the sibling that merely looks, so an agent can choose between them without opening either schema.

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

Usage Guidelines5/5

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

It names the alternative explicitly ("prefer it over craftos_ui") together with the selecting condition ("when you know what you expect"), and adds a second routing rule for the evidence artifact ("open only if the text is not enough"). Both when-to-use and when-not-to-use are inferable directly from the text.

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