Skip to main content
Glama

extract_data

Extract structured data like products, articles, or prices from web pages using JSON-LD, Microdata, OpenGraph, or CSS. Supports semantic queries and listing extraction.

Instructions

Extract JSON-schema data from JSON-LD, Microdata, OpenGraph, or CSS. Use multiple:true for listings, mode="semantic" plus query for bounded host-side chunks, or exactly one scope: selector, ref_id, backendNodeId.

When to use: Typed products, articles, prices, or semantic facts. When NOT to use: Use read_page for raw content or javascript_tool for ad-hoc scraping.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tabIdYesTab ID to extract from
schemaYesJSON Schema defining output structure. Example: { "type": "object", "properties": { "title": { "type": "string" }, "price": { "type": "number" } } }
instructionNoOptional natural language hint (e.g., "product details")
queryNoRequired for mode="semantic": query describing the information to extract from a bounded markdown chunk
maxCharsNoSemantic mode only: max chunk chars returned to the host. Default 12000, hard cap 50000.
startFromCharNoSemantic mode only: continuation offset into filtered markdown. Default: 0.
includeLinksNoSemantic mode only: preserve markdown links. Default: true.
includeImagesNoSemantic mode only: reserved for image markdown inclusion. Default: false.
alreadyCollectedNoSemantic mode only: values already collected by the host, used for simple chunk dedupe hints.
selectorNoCSS selector to scope extraction region
ref_idNoElement ref_id from read_page or oc_observe to scope extraction region
backendNodeIdNoChrome backend DOM node id to scope extraction region
multipleNoExtract array of items (for listings/tables). Default: false
output_modeNo"inline" (default): return the full payload in-band — byte-identical to v1.11.0. "handle": write payload to the handle store and return a small descriptor; redeem with oc_output_fetch. "auto": inline if payload ≤ output_inline_limit_bytes, otherwise handle.
output_inline_limit_bytesNoOnly honored when output_mode="auto". If the serialized payload exceeds this byte count the response spills to a handle. Default: 32768.
Behavior1/5

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

Annotations indicate readOnlyHint=false (not read-only), but the description implies a read-only extraction operation. This contradiction misleads about behavioral traits. Description does not disclose side effects or state changes.

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?

Description is concise and well-structured, with three sentences covering purpose, usage, and mode hints. Slightly technical but efficient.

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

Completeness2/5

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

Given 15 parameters and no output schema, the description lacks crucial details about return format and behavior. It does not specify output structure or explain all parameter interactions (e.g., scope selectors).

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

Parameters2/5

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

While schema coverage is 100%, the description references a 'mode' parameter (e.g., mode='semantic') that does not exist in the input schema, causing inconsistency. No additional parameter semantics are provided beyond the schema.

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 it extracts JSON-schema data from specific sources (JSON-LD, Microdata, OpenGraph, CSS) and distinguishes itself from sibling tools like read_page and javascript_tool.

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 provide clear guidance: use for typed products, articles, prices; avoid for raw content (read_page) or ad-hoc scraping (javascript_tool).

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/shaun0927/openchrome'

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