Skip to main content
Glama

Get product details from a URL

get_product_details

Find out what a product is and what it costs, from its page URL.

USE THIS WHEN you have the URL of ONE specific product — a store listing, a marketplace item, a manufacturer's page — and you need its fields rather than its prose. Typical jobs: comparing the same item across several stores, tracking a price over time, checking whether something is in stock, ingesting a catalogue, or getting a product photo URL.

DO NOT USE THIS FOR search-results or category pages (it returns one product, not a list), pages behind a login or paywall, or pages that are not about a product. It also cannot reach private or internal addresses.

RETURNS name, description, brand, sku, price (a number), currency (ISO 4217), availability (in_stock | out_of_stock | preorder | unknown), images (up to 5 absolute URLs copied from the page, never invented) and variants. See the output schema for the exact shape. Any field the page does not state comes back null rather than guessed.

HOW: the page is rendered in a real headless browser before extraction, so JavaScript-built pages work where a plain fetch returns an empty shell.

COST $0.01 USDC per call over x402 (the quote lists every network you can pay on: Base, and Solana where offered). No account, no API key, nothing to install, and no gas — the facilitator sponsors it. Call once WITHOUT the payment argument to get back the payment requirements, sign a payment for the quoted amount with your own wallet, base64-encode the x402 payload, and call again with that string as payment.

EVERY RESPONSE SAYS WHERE EACH FIELD CAME FROM. provenance.declared lists the fields whose values match what the merchant published in schema.org JSON-LD — their own number, the one they publish for Google. provenance.inferred lists the ones a model read off the page, which might be a strikethrough price or a neighbouring product. Act on declared values; verify inferred ones if the decision matters.

A URL that redirects to what looks like a DIFFERENT page — a discontinued item bouncing to its category listing — is refused free of charge rather than answered with the wrong product. Retry with allow_redirect: true if you want whatever the URL resolves to.

A failed extraction is not charged. Repeat calls for the same URL within 300 seconds are re-served from a recent render and marked cached: true with the render's original fetchedAt.

Call try_it_free first if you want to see real output before spending anything.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesAbsolute https:// URL of a single product page. Not a search or category page.
paymentNoBase64-encoded x402 payment payload. Omit on the first call to receive payment requirements.
allow_redirectNoDefault false. By default a URL that redirects to what looks like a different page (a discontinued item bouncing to its category listing) is refused free of charge, because extracting it would return a real product that is not the one you asked for. Set true if you want whatever the URL resolves to.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageYes
cachedYesTrue when this answer was re-served from a recent render rather than produced now. Re-serving is still a paid call; it is faster, and the data is as old as cache_age_seconds says.
statusYes
productYes
redirectYesPresent only when the browser landed somewhere other than the URL you gave. The data describes `final`, not `requested`.
provenanceYesWhere each field came from. `declared` matches what the merchant published in schema.org data — their own number. `inferred` was read off the page by a model. Null fields appear in neither. Treat a declared price as a fact and an inferred one as a reading.
settlementYesBase64 x402 settlement receipt, when the facilitator returned one.
cache_age_secondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedOutput schema / properties / provenance
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Where each field came from. `declared` matches what the merchant published in schema.org data — their own number. `inferred` was read off the page by a model. Null fields appear in neither. Treat a declared price as a fact and an inferred one as a reading.",
      +  "properties": {
      +    "declared": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "inferred": {
      +      "items": {
      +        "type": "string"
      +      },
      +      "type": "array"
      +    },
      +    "source": {
      +      "enum": [
      +        "json-ld",
      +        "meta",
      +        "json-ld+meta",
      +        "none"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "source",
      +    "declared",
      +    "inferred"
      +  ],
      +  "type": "object"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "status",
      -  "product",
      -  "page",
      -  "cached",
      -  "cache_age_seconds",
      -  "redirect",
      -  "settlement"
      -]New value: +[
      +  "status",
      +  "product",
      +  "page",
      +  "cached",
      +  "cache_age_seconds",
      +  "provenance",
      +  "redirect",
      +  "settlement"
      +]
  2. Added

TDQS

A4.9/5.0
Behavior5/5

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

No annotations, so the description carries the full burden and does so richly: headless-browser rendering, x402 payment flow (call once without payment, then pay), $0.01 USDC cost and sponsored gas, provenance.declared vs provenance.inferred semantics with an explicit 'act on declared, verify inferred' rule, free refusal on cross-page redirects, no-charge failed extractions, and 300-second cache re-serving. This is far beyond annotation-level disclosure.

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?

Front-loaded and well-sectioned with USE THIS WHEN / DO NOT / RETURNS / HOW / COST / provenance headings that scan cleanly. It runs long, but nearly every sentence carries decision-relevant payload (cost, payment protocol, provenance trust rule); a slight trim would reach 5.

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?

Despite an output schema existing, the description still adds value by explaining provenance trust tiers, null-for-missing-fields policy, image cap, and payment mechanics. For a paid, multi-step tool with a bespoke auth flow, nothing an agent needs 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 100%, so baseline is 3, but the description adds the x402 call-twice protocol, explains why allow_redirect is refused (wrong-product risk), and clarifies url must be a single product page. It complements the schema with usage semantics the schema descriptions don't carry.

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?

States a specific verb+resource+scope: extract product fields and price from ONE product URL. It explicitly distinguishes from search/category pages and names the sibling try_it_free for free previews. An agent can tell it apart from read_page, page_brief, and compare_products without opening schemas.

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 'USE THIS WHEN' enumerates concrete jobs (cross-store comparison, price tracking, stock checks, catalogue ingestion) and 'DO NOT USE THIS FOR' lists exclusions (search/category pages, paywalled/login pages, non-product pages, private addresses). This is textbook when/when-not routing.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.