Skip to main content
Glama

Assert

assert

Validate browser conditions such as URL, title, visible text, element visibility, or input values, returning pass/fail results with failure context.

Instructions

Run a browser assertion and return a pass/fail result with failure context.

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

Input Schema

NameRequiredDescriptionDefault
kindYes
pageIdNoPage id. Defaults to the active page.
expectedNo
selectorNo
timeoutMsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

No annotations are present, so the description carries the full behavioral burden. It discloses that the tool returns a pass/fail result with failure context, which is useful. However, it omits important behavior such as whether failures throw or are returned, how timeoutMs affects waiting, and what selector semantics are for different assertion kinds.

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 single sentence is front-loaded and free of unnecessary wording. It is concise, but that conciseness contributes to under-specification rather than being fully optimized for agent comprehension. The structure is clean with no redundant phrasing.

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?

This is a multi-parameter assertion tool with low schema coverage and no annotations or output schema. The description is therefore doing too little: it does not explain the assertion kinds, expected versus selector usage, timeout behavior, or default page targeting. It is not complete enough for an agent to call the tool confidently without inspecting the schema closely.

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 only 20 percent: only pageId has a description. The description does not compensate by explaining kind, expected, selector, or timeoutMs. An agent must infer the meaning of four parameters from their names and the enum values alone.

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 states a specific verb and resource: run a browser assertion and return a pass/fail result. It is clear enough to distinguish this from action tools like click or fill, though it does not name any of the assertion kinds supported by the schema. The addition of failure context clarifies the output, making the purpose somewhat more informative than a bare name.

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?

There is no guidance on when to use this assertion tool versus alternatives such as snapshot, evaluate, or element_info. It also does not explain when the various assertion kinds are appropriate or how pageId affects targeting. The definition provides only a bare capability statement with no usage context.

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