Skip to main content
Glama

browser_extract

Extracts list data from repeated containers using CSS selectors and field mappings, returning structured JSON or CSV for product lists, search results, and notifications.

Instructions

按"重复容器 + 字段映射"抓取列表数据(商品列表/搜索结果/通知列表等),返回 JSON/CSV

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": {
      "items": "<items>",
      "fields": "<fields>"
    },
    "name": "browser_extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
saveNo是否保存到输出目录
itemsYes重复容器的 CSS 选择器,如 .search-result-item
fieldsYes字段映射:字段名 -> 容器内相对选择器,如 {"标题": "h3 a", "价格": ".price"}
formatNo输出格式,默认 json
filenameNo保存的文件名

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses the output formats (JSON/CSV) and that extraction is driven by a repeated container plus field mapping, but it says nothing about prerequisites (page must already be navigated), lazy-loading/scroll behavior, or what happens when a field selector matches nothing.

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?

It is a single front-loaded sentence that states mechanism, scope, examples, and return format with no wasted words. The parenthetical examples are compact and earn their place as scope illustration.

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

Completeness3/5

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

There is no output schema, and the description partially compensates by stating JSON/CSV returns. However, for a five-parameter extraction tool with nested object semantics and no annotations, it omits the prerequisite that a page must be loaded and how dynamic/lazy content is handled.

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 description coverage is 100%, and the schema already explains items, fields, format, filename, and save, so the baseline is 3. The description echoes the items/fields concept (container + field mapping) but adds no syntax or edge-case detail beyond the schema.

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 uses a specific verb (抓取/scrape) and a specific resource (列表数据, with examples 商品列表/搜索结果/通知列表), plus the mechanism (重复容器 + 字段映射) and output formats (JSON/CSV). It does not distinguish itself from the sibling browser_extract_table, so an agent must infer that table extraction belongs elsewhere.

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?

The parenthetical list of example scenarios (product lists, search results, notification lists) implies when this tool applies, but there is no explicit when-not guidance and no named alternative such as browser_extract_table for HTML tables or browser_get_text for single values.

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