Skip to main content
Glama

AI kiểm chứng kết quả

tester_browser_assert

Verifies observed UI state, page URL, HTTP response status, or horizontal overflow during a test run. Confirms final page conditions so HTTP codes alone don't imply authorization or business success.

Instructions

Xác nhận UI, URL, trạng thái HTTP đã quan sát trong test case hoặc tràn ngang. Mã HTTP không đủ để kết luận phân quyền hoặc nghiệp vụ thành công nếu thiếu kiểm tra trạng thái cuối.

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": {
      "project": "<project>",
      "type": "<type>"
    },
    "name": "tester_browser_assert"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNo
pathNo
roleNo
typeYes
methodNoGET
projectYes
expectedNo
selectorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations supplied, the description carries the full burden, and it does add a genuine interpretive rule — that matching an HTTP status is insufficient to conclude authorization or business outcomes without a final-state check. However, it omits critical behavior: what happens on a failed assertion (throw, return error, halt the run, record a finding), whether the call mutates test state, and whether it needs an active browser session.

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?

Two short sentences with no filler; the assertion targets are front-loaded. The second sentence is a caution rather than operating detail, but it is brief and does not pad the definition.

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 an 8-parameter, 2-required tool with no annotations, no output schema, and no parameter documentation, the definition is thin. It never explains how to construct the required project/type pair, what a failed assertion looks like, or how this differs from the other observation tools in the family.

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 coverage is 0% across 8 parameters, so the description must compensate and largely does not. It hints at what the assertion targets are (UI, URL, HTTP status, overflow), giving loose meaning to type/expected/selector, but says nothing about project, path, role, name, or method, and does not explain how selector pairs with type or whether expected is a literal or pattern.

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 names a specific verb ("Xác nhận" / assert) and concrete targets — UI, URL, HTTP status, horizontal overflow — which broadly map to the type enum values (visible, hidden, containsText, url, responseStatus, noHorizontalOverflow). An agent can tell this is the assertion/verification step, though it does not explicitly separate itself from siblings like tester_browser_see or tester_browser_inspect.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: "đã quan sát trong test case" (observed in the test case) suggests calling it after observation, and the second sentence warns that an HTTP code alone does not prove authorization or business success. There is no explicit when-to-use vs. which sibling, no preconditions, and no statement about ordering relative to tester_browser_step or tester_browser_see.

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