Skip to main content
Glama

ghost_assert

Verify UI state by asserting predicates such as text presence, element existence, or value equality. Fails the check when the condition is unmet, providing clear pass/fail validation.

Instructions

Assert a predicate about screen state. Fails (error) if not satisfied. text-present/text-absent: OCR text check. element-exists: element found. value-equals/value-contains: the element's actual value (ValuePattern) equals/contains 'text' - the fill-then-verify check.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoElement name (element-exists|value-*)
roleNoElement role (element-exists|value-*)
textNoText to check (text-present/absent) or expected value (value-equals/contains)
windowNoTitle substring of the window to check (anchors it). Omit to use the anchor. text-present/absent then OCR THAT window by handle, never the foreground.
predicateYes
foregroundNoOnly without a window/anchor: OCR the foreground window (true) or the whole screen

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.23.4

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden and does meaningfully disclose two critical traits: assertion failure is an error, and text predicates OCR a specific anchored window 'by handle, never the foreground.' The foreground/window fallback rule ('Only without a window/anchor') further clarifies targeting behavior, which is exactly the kind of context an agent needs.

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?

Four tightly packed sentences, each earning its place: core purpose, failure behavior, predicate taxonomy, and the value-check semantic. The front-loaded failure mode and the compact slash-notation for predicate groups make it dense but highly scannable for an agent.

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 six-parameter tool with no annotations and no output schema, the description covers the most important operational gaps: failure semantics, OCR window anchoring, and predicate-to-parameter relationships. Minor omissions remain — the success return value is never stated, and element matching via name/role is left to the schema — but these are secondary for a verification tool whose core contract (pass/fail-with-error) is explicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 83%, so the baseline is 3, but the description adds genuine meaning beyond the schema: it maps each predicate enum value to its semantic ('text-present/text-absent: OCR text check', 'element-exists: element found') and clarifies that value-equals/value-contains compare the element's actual ValuePattern against 'text' as a 'fill-then-verify check.' This clarifies how predicate and text interrelate in a way the schema's per-field descriptions do not.

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 and resource ('Assert a predicate about screen state') and immediately distinguishes itself from observation siblings like ghost_see/ghost_find/ghost_query by the failure semantics: 'Fails (error) if not satisfied.' The predicate taxonomy (text-present/absent, element-exists, value-equals/contains) fully enumerates the tool's scope, leaving no ambiguity about what it does.

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?

Per-predicate usage is implied through the compact labels ('OCR text check', 'element found', 'fill-then-verify check'), which give an agent a sense of when each mode applies. However, there is no explicit guidance on when to choose ghost_assert over sibling verification alternatives such as ghost_see, ghost_find, or ghost_wait, nor any stated exclusions or prerequisites.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NORTHTEKDevs/ghost'

If you have feedback or need assistance with the MCP directory API, please join our Discord server