Skip to main content
Glama

assert_ui

Read-only

Verify rendered UI conditions in PyWebView desktop app tests and return a failed result on mismatch to prevent false passes.

Instructions

Assert a rendered UI condition; mismatch returns failed MCP result, not a pass.

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>",
      "condition": "<condition>"
    },
    "name": "assert_ui"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeoutNo
conditionYes
session_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so the safety profile is covered. The description adds a genuinely useful behavior beyond the schema: a mismatch yields a failed MCP result rather than a passing one, which changes how an agent should interpret outcomes. It omits whether the assertion polls until `timeout` expires, which is the main remaining behavioral unknown.

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?

A single sentence with no wasted words; the purpose is front-loaded and the failure-mode clarification follows immediately.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 an eleven-kind condition enum and no output schema, the definition covers purpose and failure semantics but leaves the agent to discover timeout behavior and the ready/url/generation/epoch kinds from the schema alone. Adequate, but not complete against the tool's actual complexity.

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?

The reported top-level coverage is 0% (timeout and session_id are undocumented anywhere), but the nested Condition and Locator definitions are richly described in the schema, so the heavy lifting is done structurally. The description itself adds no parameter information beyond the word "condition" — no explanation of timeout default/polling or how the condition kinds map to expected values.

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?

"Assert a rendered UI condition" states a specific verb and resource, and the second clause clarifies what an assertion failure means. It does not, however, distinguish this from siblings like `wait` or `inspect`, which an agent must infer.

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

Usage Guidelines2/5

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

No when-to-use or when-not-to-use guidance is given, and no alternative is named. The note that mismatches produce a failed result hints at gating use cases, but the agent gets no explicit rule for choosing assert_ui over `wait` or `snapshot`.

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