Skip to main content
Glama

assert

Checks a stated condition on the current page without interacting, confirming expected content or state and failing the flow when the condition does not hold.

Instructions

Check a condition on the current page now; never acts. State the expected text in the sentence, e.g. "the order list shows a row with total 42.00". In a learn session a passing assert becomes a flow step that fails the run when it does not hold. Credentials: write each secret as one {{env:NAME}} marker ({{totp:NAME}} for a one-time code), exactly as written: the marker alone, never the value and never $NAME. NAME must be set in the environment the MCP server was started with. Never ask the user for a secret value. isError with exit 1 = the condition did not hold; exit 2 = could not be checked.

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

Input Schema

NameRequiredDescriptionDefault
cwdNoProject directory (absolute) the command runs in; sitelooper.config.json is found from here. Default: the server's working directory.
sessionNoBrowser session name (default "default"). Each session is its own browser and daemon.
conditionYesThe condition to check (sent on stdin).
timeout_sNoDeadline in seconds (--timeout).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior5/5

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

Annotations only carry openWorldHint=true, and the description adds substantial behavior: it never acts on the page, its result is promoted into a flow step during learn sessions, and error semantics are spelled out (exit 1 = condition did not hold, exit 2 = could not be checked). It also documents the credential-marker convention and the rule never to ask the user for a secret value. Nothing here contradicts the annotation.

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?

Purpose and the non-mutating guarantee are front-loaded, followed by the example and result semantics in a logical order. The credentials passage is somewhat tangential for a read-only assertion tool and includes a mildly redundant 'Never ask the user for a secret value' after already mandating markers only.

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 4-parameter tool with full schema coverage and no output schema, the description covers what the agent most needs: what is checked, that nothing is mutated, and how failures are signaled. Minor gaps remain, such as whether the condition supports waiting or retry and how it interacts with session or timeout behavior.

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 100%, so the baseline is 3; the description exceeds it for the required parameter by explaining that the condition is an English sentence stating the expected text, with a worked example, and that it is sent on stdin. The other three parameters (cwd, session, timeout_s) are left entirely to the schema, which already documents them.

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?

States a specific verb and resource: 'Check a condition on the current page now; never acts,' which tells an agent both the action and that it is non-mutating. It also gives a concrete condition example ('the order list shows a row with total 42.00'). It does not explicitly differentiate from the ambiguous sibling 'check', so it falls short of 5.

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

Usage Guidelines4/5

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

Clear context is supplied: evaluate against the current page, immediately, and in a learn session a passing assert becomes a flow step that fails the run later. It does not name an alternative tool or state when not to use this one, so it stops at clear context rather than explicit routing.

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