Skip to main content
Glama

extract

Scrape structured JSON rows from cards, tables, and forms across DOM, Shadow DOM, and iframes using selector-based field mapping.

Instructions

Extract JSON rows from containers (cards/tables/forms) across DOM/Shadow/iframes. fields: name -> 'text:.sel'|'@attr .sel' ('@value'/'@checked' for inputs)|'html:.sel'|{selector,mode,attr}.

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": {
      "container_selector": "<container_selector>",
      "fields": "<fields>"
    },
    "name": "extract"
  }
}

Input Schema

NameRequiredDescriptionDefault
tabNo
limitNo
fieldsYes
max_lengthNo
include_shadowNo
include_iframesNo
container_selectorYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

B3.4/5.0
Behavior3/5

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

With no annotations at all, the description carries the full behavioral burden. It usefully discloses that traversal covers DOM, Shadow DOM, and iframes, but says nothing about the default row cap (limit=20), truncation at max_length, what tab=-1 means, or what happens when container_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?

Two tight sentences with the purpose front-loaded and the field syntax appended as a compact reference. Nothing is padded, though the compressed notation ('@attr .sel') is terse enough that it borders on cryptic for an unfamiliar agent.

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?

An output schema exists, so return shape need not be described. However, for a 7-parameter tool with nested objects and zero annotation coverage, the omission of pagination/limit behavior, truncation, and tab targeting leaves real gaps an agent would need in order to call it correctly.

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 0% and there are 7 parameters, so the description has to compensate and it only partly does. It explains the hardest parameter, fields, with a real mini-DSL ('text:.sel', '@attr .sel', '@value'/'@checked', 'html:.sel', object form), but leaves container_selector, tab, limit, and max_length entirely undefined in both schema and prose.

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?

States a specific verb and resource: 'Extract JSON rows from containers (cards/tables/forms)'. The parenthetical container examples make the target scenario concrete, so an agent can tell it is for structured row scraping rather than raw page content. It stops short of distinguishing itself from sibling content readers such as get_content or snapshot.

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 implied by the container-plus-fields shape: you use it when you have a repeated container (card list, table, form) and want named rows out of it. There is no explicit when-not guidance, no prerequisites, and no stated boundary against alternative extraction approaches.

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