Skip to main content
Glama

browser_assert

Read-only

Assert browser states: page contains text, URL matches, or element visible. Returns pass/fail to prove an outcome, confirming the final destination rather than assuming a link indicates success.

Instructions

Prove an outcome instead of inferring it. Provide one of: contains (page text includes string), url_includes (current url contains string), ref_visible (a ref is present and visible). Returns pass/fail. When the goal is to reach a specific result, a matching link in a list is NOT success — click through and assert the destination.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdNo
containsNo
ref_visibleNo
url_includesNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

The description goes beyond the readOnlyHint and openWorldHint annotations by specifying that the call returns pass/fail and by defining what each assertion checks. It also adds an important behavioral caveat about not treating link presence as success, which helps the agent sequence downstream actions correctly.

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?

The description is compact and front-loaded, leading with the core purpose before enumerating options. Every sentence adds a distinct piece of information—modes, return type, and a caution—so there is no filler.

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 read-only assertion tool, the description covers purpose, options, return value, and an important usage caveat. It is missing only minor completeness details such as how tabId is resolved and what happens when no assertion argument is provided, but these are largely inferable from the sibling tool context.

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?

With zero schema description coverage, the description carries the parameter-documentation burden and defines three of four parameters (contains, url_includes, ref_visible) with precise semantics in parentheses. It also imposes a 'provide one of' constraint, though it does not describe tabId or what happens if multiple or no arguments are supplied.

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 opens with a specific imperative, 'Prove an outcome instead of inferring it,' and enumerates three concrete assertion modes (contains, url_includes, ref_visible). This makes the tool's verification role clear and distinguishes it from the observational/navigational sibling tools.

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?

It provides clear context for when to assert ('when the goal is to reach a specific result') and an explicit when-not rule ('a matching link in a list is NOT success'). It does not name sibling alternatives such as browser_observe or browser_act explicitly, but the guidance is strong enough to route behavior.

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