Skip to main content
Glama
scrape-mcp
by guanyuyan

login

Open a browser for manual sign-in and persist session cookies to disk, so web_fetch can access sites requiring authentication without repeating the process.

Instructions

打开浏览器登录,并把该站登录态持久化到磁盘。

用于 web_fetch 报告 login_required=true 的站点:默认弹出可见窗口,请在里面完成登录; 检测到登录成功或超时后,登录态(cookie 等)会被保存,之后该站的 web_fetch 会自动带上。

Args: url: 目标站点任一页面 URL(按域名区分登录态)。 timeout: 等待手动登录完成的秒数,超时也会保存当前状态便于下次继续。 session: 会话名(默认 default)。需要多账号/多身份时分别用不同名字登录, web_fetch 时传同一个 session 即可,互不覆盖。 headless: 无 GUI 服务器上设为 true:不弹窗口,把登录页截图保存到 DATA_DIR/login/,看截图或扫码完成登录;也可改用 session_import 导入 cookie。 qr_selector: 登录页上二维码元素的 CSS 选择器;命中时只截二维码,便于手机扫码。 cdp_url: 远程浏览器 CDP 地址(http/https/ws/wss);给出时连到该浏览器登录, 适合本地无 GUI 但另一台机器能开浏览器的场景。

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": {
      "url": "<url>"
    },
    "name": "login"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
cdp_urlNo
sessionNodefault
timeoutNo
headlessNo
qr_selectorNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.25.0
    • addedInput schema / properties / cdp_url
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Cdp Url"
      +}
    • addedInput schema / properties / headless
      Added value: +{
      +  "default": false,
      +  "title": "Headless",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / qr_selector
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Qr Selector"
      +}
  2. Changed1 schema field changedv0.10.1
    • addedInput schema / properties / session
      Added value: +{
      +  "default": "default",
      +  "title": "Session",
      +  "type": "string"
      +}
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

No annotations exist, so the description bears the full behavioral burden, and it largely does: default visible window, manual-login wait with timeout, state saved even on timeout for later resumption, headless screenshots written to DATA_DIR/login/, and CDP remote-browser support. What it does not say is what happens to previously stored state for the same session (overwrite vs. merge) or what the return/output looks like — though an output schema exists, so the latter is partly excused.

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?

Purpose and trigger are front-loaded before a structured Args block, and each parameter entry adds a real operational fact rather than restating the type. It runs long relative to a typical definition, but there is little filler; the qr_selector and cdp_url entries could be tightened slightly.

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?

For a multi-modal browser-automation tool with 6 parameters and zero schema coverage, the description covers the visible-window path, the headless path, the QR path, the remote-CDP path, the multi-session path, and the timeout-recovery path. Return values are covered by the output schema, so nothing an agent needs in order to call it correctly is missing.

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 coverage is 0%, so the description must carry all parameter meaning, and it does: url scopes state by domain, timeout is the manual-login wait window, session is the multi-identity partition key with the crucial note that web_fetch must reuse the same name, headless explains the no-GUI fallback including the screenshot directory, qr_selector is a CSS selector that narrows the capture to the QR code, and cdp_url accepts http/https/ws/wss remote endpoints.

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 first sentence states a concrete verb and effect: open a browser, log in, and persist the site's login state to disk. It also names the triggering condition (web_fetch returning login_required=true), which separates it from sibling session_import and from web_fetch itself.

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 is given ('sites where web_fetch reports login_required=true') along with alternatives: session_import for cookie import, and cdp_url for the case where the local machine has no GUI but another machine has a browser. Multi-account scenarios are routed to separate session names with a note that web_fetch must pass the same session.

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