Skip to main content
Glama

assert_page_contains

Verify that a specified string appears in the page's visible text or HTML source, with optional source-only checking for automated browser tests.

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

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.0.0

TDQS

C2.8/5.0
Behavior2/5

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

With no annotations provided, the description must carry the behavioral disclosure. It only states that an assertion is made, but does not disclose whether failure throws an exception, whether it waits for the text, case sensitivity, or how the source_only flag changes behavior beyond the schema.

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, efficient sentence with no redundant wording. The core operation is stated directly and front-loaded, making it easy to parse.

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?

For a simple assertion tool with no annotations and no output schema, the description leaves important gaps: failure behavior, relation to sibling assertions, and how source_only is applied. It is minimally viable but not complete enough for confident invocation.

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 is explained, but the required text parameter has no description. The phrase 'contains a string' only vaguely references text and does not clarify substring matching or exact semantics, so it does not compensate for the schema gap.

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 identifies a specific verb ('Assert'), resource ('full page source or visible text'), and target ('contains a string'). It scopes to the whole page, which distinguishes it from element-level assertions like assert_text, though it doesn't explicitly name the alternative.

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 is given about when to use this tool versus sibling assertion tools such as assert_text, assert_title, or assert_element_visible. There are no conditions, exclusions, or alternatives mentioned.

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

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/hakanngul/testfly-mcp'

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