enrich_html
Extract product data from raw HTML you already have (no HTTP fetch needed). Ideal when using Bright Data, Firecrawl, or any scraping API — pipe the HTML through ShopGraph for structured product data. Uses schema.org + LLM fallback. Costs $0.02 per call (cached results are free). Each field carries verification metadata in _shopgraph: provenance (field_method — which source/tier produced it: schema_org, llm, or hybrid), freshness (field_freshness — recency + volatility_class, for volatile fields like price & availability), and abstain (a field is null when ShopGraph cannot verify it on the page). Rely on provenance, freshness, and the abstain signal to decide what to trust.
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": {
"html": "<html>",
"url": "<url>"
},
"name": "enrich_html"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Original URL of the page (used for context and caching) | |
| html | Yes | Raw HTML content of the product page | |
| format | No | Output format. "ucp" returns UCP line_item format. Default: "default". | default |
| force_refresh | No | Bypass cache entirely. Always triggers live extraction. Costs 3x credits. | |
| include_score | No | Include agent-readiness score in response. | |
| payment_method_id | No | Stripe payment method ID for MPP payment | |
| minimum_confidence | No | Auto-refresh if any cached field's DECAYED confidence falls below this threshold. | |
| strict_confidence_threshold | No | Fields below this confidence will be nulled with explanation. Default: off. |