Skip to main content
Glama

browser_counterfactual_analyze

Analyze test failures by evaluating if removing a potential factor (obstruction, JS error, HTTP error, loading issue) would prevent failure. Generate ranked root cause hypotheses with confidence scores and verification suggestions.

Instructions

反事实根因分析 - 当测试失败时,分析"如果消除因素X(遮挡物/JS错误/HTTP错误/加载问题),测试是否还会失败",自动生成根因假设并按置信度排序,给出验证工具建议

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNo输出格式:json(默认结构化数据)或 html(HTML 报告)json
failureContextNo可选,失败上下文描述(如"按钮不可见"、"表单提交失败"、"网络超时"等),用于匹配相关根因假设并提高置信度
Behavior4/5

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

With no annotations, the description bears full responsibility. It discloses that the tool generates root cause hypotheses, ranks them by confidence, and suggests verification tools. It lists the factors analyzed and implies a non-destructive analytical operation. Missing details like required session state but overall transparent.

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 sentence that efficiently conveys the purpose, but it is somewhat lengthy and could benefit from clearer structure or bullet points for readability. Front-loads the main idea.

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?

Given the tool has 2 parameters, no output schema, and many sibling diagnostic tools, the description adequately explains the core function and output nature (hypotheses with confidence, verification suggestions). It could mention the dependency on an active test failure context or session, but overall it is reasonably complete.

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

Parameters3/5

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

Schema coverage is 100% with both parameters described. The tool description does not add significant meaning beyond what the schema provides for 'format' and 'failureContext'. Baseline of 3 is appropriate as no extra value is added.

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 clearly states the tool performs 'counterfactual root cause analysis' when a test fails, analyzing specific factors (blockers, JS errors, HTTP errors, loading issues) to generate hypotheses sorted by confidence and verification suggestions. This is a specific verb and resource, distinguishing it from sibling tools like browser_diagnose or error_analyze.

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?

The description specifies the context as 'when a test fails', providing clear usage context. However, it does not explicitly mention when not to use the tool or suggest alternative sibling tools for different scenarios. Nonetheless, the counterfactual nature sets it apart.

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/validpilot/ai-verify-mcp'

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