Skip to main content
Glama

analyze_url

Probe a live web page in headless Chromium to extract testable modules (forms, nav, dialogs, CTAs) and API endpoints, returning candidate test cases and layout warnings.

Instructions

Probe a live web page in headless Chromium and return a structured map of testable modules plus the API endpoints the page actually called. The web counterpart of analyze_screen.

Behavior:

  • page.goto(url) with DOMContentLoaded + 5s networkidle wait

  • DOM probe extracts five module kinds: form (with fields[] + required flags), nav (link lists), dialog (modal containers), section (labeled regions), cta (action buttons matching action keywords like 登入/送出/ Login/Submit)

  • Each module gets a candidate_tcs[] — domain-aware test case strings ready to paste into generate_test

  • Records every fetch/XHR the page issues, dedupes by (method, path), adds endpoint-specific candidate TCs (401, 404, 4xx, payload-too-large…)

  • Layout overflow scan flags visible elements whose content escapes its container by >2 px horizontal / >10 px vertical (跑版 / text-overflow) Returns: {url, page_title, scanned_at, modules[], api_endpoints[], layout_warnings[]}

When to use:

  • User wants tests for a specific URL or page

  • Designing regression coverage from real user-facing behavior

  • Need backend API coverage hints (api_endpoints[] gives methods + paths)

  • Investigating layout bugs at the current viewport

  • Pair with generate_test(module=…) for one runnable test per module

When NOT to use:

  • Mobile apps (no DOM) → use analyze_screen

  • Want analysis + immediate test generation → use auto_generate_tests (one-shot version)

  • Looking for existing tests → use list_tests

  • Single-page testing prototype → use codegen instead

Edge cases:

  • URL unreachable / timeout → returns {error: 「打開頁面失敗…」, url}

  • Page has 0 forms / 0 ctas → modules[] is empty but the call succeeds

  • Login-walled URL with no auth_cookie → analyzes the login page (less useful) — pass auth_cookie to reach post-login pages

  • SPA with delayed hydration → bump timeout_ms to 30000+

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes要分析的網頁 URL,需含 protocol(http:// 或 https://)。
timeout_msNo選填,page.goto 等待 DOMContentLoaded 的逾時毫秒數。之後額外 wait 5 秒讓 networkidle(XHR 載入)穩定。預設 15000。慢站 / 需要 SSR / 重 JS hydration 的網站可拉到 30000+。
auth_cookieNo選填,預先注入登入 cookie,格式:`name1=value1; name2=value2`(一行 cookie header)。用法:先在瀏覽器 DevTools / Application / Cookies 複製值再貼進來。用於分析需要登入後才看得到的頁面。
Behavior5/5

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

No annotations are provided, so the description carries the full burden. It details the page.goto behavior (DOMContentLoaded + 5s networkidle), DOM probe for five module kinds, candidate test case generation, XHR/fetch recording with dedup, and layout overflow scan. Error conditions and behavior for edge cases are also described.

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 well-structured into sections ('Behavior', 'When to use', 'When NOT to use', 'Edge cases') with bullet points for clarity. It is relatively long but each paragraph adds value; slight conciseness could be improved without losing information.

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

Completeness5/5

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

Given the tool's complexity (web page analysis with multiple output components) and no output schema, the description explains the return structure in detail (url, page_title, scanned_at, modules[], api_endpoints[], layout_warnings[]). It also covers edge cases, making it comprehensive for an AI agent to understand behavior and expectations.

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

Parameters5/5

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

Schema description coverage is 100% (all three parameters have descriptions). The description adds extra context: timeout_ms default and recommendation for slow sites, auth_cookie usage and format. This goes beyond schema information, providing actionable guidance.

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 probes a live web page in headless Chromium and returns a structured map of testable modules and API endpoints. It distinguishes itself from analyze_screen (web vs mobile), providing a specific verb ('Probe') and resource ('live web page').

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

Usage Guidelines5/5

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

Explicit 'When to use' and 'When NOT to use' sections list concrete scenarios (e.g., user wants tests for URL, regression coverage, layout bugs) and alternatives (analyze_screen, auto_generate_tests, list_tests, codegen). Edge cases like unreachable URLs, empty modules, login-walled pages, and SPA hydration are also covered.

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/kao273183/mk-qa-master'

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