Skip to main content
Glama

pilot_assert

Verify current page state by asserting URL, text presence, element visibility, or input value. Returns pass/fail signal for automated test flows.

Instructions

Assert a condition about the current page state and fail with a structured error if the assertion is not met. Use when the user wants to verify the outcome of an action — that a URL was reached, text is present or absent, an element is visible/hidden/enabled, or an input has a specific value. Returns a clear pass/fail signal for agent-driven test flows.

Parameters:

  • url: Assert the current page URL equals or contains this string

  • text_present: Assert this text is visible somewhere on the page (waits up to 5s)

  • text_absent: Assert this text is NOT visible on the page

  • ref: Element ref (@eN) to assert a state or value on

  • state: Expected element state — "visible", "hidden", "enabled", or "disabled"

  • value: Expected input value for the element pointed to by ref

Returns: "✓ N assertion(s) passed" if all checks pass.

Errors:

  • Returns isError=true with details of which assertion failed and what was found instead.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoAssert current URL equals or contains this string
text_presentNoAssert this text is visible on the page
text_absentNoAssert this text is NOT visible on the page
refNoElement ref (@eN) to check state or value
stateNoExpected element state
valueNoExpected input value for the element ref
Behavior4/5

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

The description discloses that text_present waits up to 5s and returns a structured error on failure. No annotations are provided, so the description carries full burden. It does not specify whether other assertions have wait behavior, but overall behavioral detail is good.

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?

The description is well-structured with clear sections for parameters, returns, and errors. It includes a parameter list that could be trimmed given the schema, but the added behavioral notes justify the length. No redundant sentences.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (6 parameters, no output schema), the description fully explains parameter semantics, return value format, and error handling. It covers all necessary aspects for an agent to use the tool correctly in test verification flows.

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 descriptions cover all parameters at 100%, but the description adds contextual hints (e.g., 'waits up to 5s' for text_present, 'fails with structured error') that enhance understanding beyond the schema. This adds value while being concise.

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?

The description clearly states the tool's purpose: asserting conditions about page state with a structured error on failure. It identifies the specific use cases (URL, text, element state/value) and is distinct from sibling tools like pilot_click or pilot_navigate.

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?

The description explicitly tells when to use: 'to verify the outcome of an action' and lists common assertion scenarios. It lacks explicit when-not-to-use or alternative tools, but provides clear usage context for verification tasks.

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

Install Server

Other Tools

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/TacosyHorchata/Pilot'

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