Skip to main content
Glama

assert_page_contains

Assert that a page's visible text or HTML source contains a specified string. Use source_only to check raw source instead of visible content.

Instructions

Assert the full page source or visible text contains a string.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
textYes
source_onlyNoIf true, checks page source; otherwise checks body visible text
Behavior2/5

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

With no annotations, the description should disclose more behavioral traits (e.g., what happens on failure, waiting behavior, impact on page state). It only mentions the two modes but lacks details on error handling or side effects.

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 a single concise sentence that clearly conveys the core functionality. It avoids redundancy but could benefit from additional context without being verbose.

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

Completeness2/5

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

Given the lack of output schema and annotations, the description should provide more complete context about the assertion behavior, such as whether it waits for the text to appear, returns a boolean, or throws an error. The tool is part of a browser automation suite, so this context is important.

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

Parameters2/5

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

Schema description coverage is 50%: source_only has a description in schema, but text parameter does not. The description adds value by explaining the source_only field (check source vs visible text) but does not elaborate on the required text parameter beyond saying it's a string to look for.

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?

The description clearly states the tool asserts that the full page source or visible text contains a string. It specifies the scope (full page) and the two modes (source vs visible text), which differentiates it from element-specific assertion tools like assert_text.

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 guidance on when to use this tool versus alternatives such as assert_text or assert_element_visible. No mention of when to check page source vs visible text, or any prerequisites.

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/seleniumboot/selenium-mcp'

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