Skip to main content
Glama

terminal_assert

Verifies that a terminal session's screen contains expected text or matches a regex pattern, returning pass/fail with current screen content and a message.

Instructions

Assert that the terminal screen contains expected text or matches a regex pattern. Returns pass/fail with the current screen content and a human-readable message.

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": {
      "session_id": "<session_id>",
      "text": "<text>"
    },
    "name": "terminal_assert"
  }
}

Input Schema

NameRequiredDescriptionDefault
textYesThe text or regex pattern to search for
regexNoIf true, treat text as a regex pattern (default: false)
session_idYesThe session ID returned by terminal_spawn

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full behavioral burden and does deliver useful return context: pass/fail plus the current screen content and a human-readable message. It omits key traits an agent needs, such as whether a mismatch raises an error or simply returns fail, whether the assertion waits/retries, and whether the call is side-effect free.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences with no filler: the first states what is asserted, the second states the return shape. The purpose is front-loaded and nothing is redundant with the title or 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 three-parameter tool with fully documented schema, the definition covers purpose and return values adequately, and the absence of an output schema is offset by the description of the pass/fail result. The remaining gap is failure/timing behavior, which matters for an assertion tool but is not fatal here.

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 100%, so session_id, text, and regex are already documented in the schema, including the regex default. The description restates the text/regex distinction without adding syntax details, anchoring rules, or case-sensitivity behavior, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb ('Assert') and resource ('terminal screen') plus the two matching modes (literal text or regex), which is enough to distinguish it from mutating siblings like terminal_type or terminal_send_key. It stops short of naming terminal_wait_for, the closest alternative, so an agent must infer the verify-now vs. wait-for-later split.

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

Usage Guidelines3/5

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

Usage is only implied: the tool is for checking that the screen contains expected content, which suggests a verification step after sending input. There is no explicit statement of when to use this instead of terminal_wait_for, nor any mention of timing, preconditions (e.g., that the session must already be spawned), or failure conditions.

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