Skip to main content
Glama

Tollkit Extract

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.05 USDC per call over x402 on Base. 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 an EIP-3009 transferWithAuthorization with your own wallet for the quoted amount, 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

A5/5.0
Behavior5/5

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

With no annotations, the description carries the full burden, and it does so thoroughly: it discloses the headless-browser rendering, cost and payment protocol, refusal of unsafe redirects, cache behavior within 300 seconds, and free failed extraction. It also explains provenance and that unknown fields come back null rather than guessed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The text is long but organized with headers and front-loaded with the core purpose before operational details. Every section (cost, redirects, caching, provenance, payment flow) earns its place because it is necessary for correct invocation of a paid, authentication-required tool. No filler or redundancy.

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?

Given the tool's complexity — a paid x402 flow, redirect handling, cache behavior, and an output schema with provenance — the description covers each area and points to the output schema for exact shape. There are no missing pieces an agent would need to call it correctly; it even explains the two-call payment sequence and refund-on-failure.

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?

The input schema already documents all three parameters (100% coverage), but the description enriches them: `url` must be absolute https and a single product page; `payment` is omitted on the first call and is a base64 x402 payload; `allow_redirect` defaults to false and its refusal semantics are explained. This goes well beyond the schema's descriptions.

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 opens with a specific verb and resource ('Find out what a product is and what it costs, from its page URL'), then narrows scope to a single product page and states it returns one product, not a list. This clearly separates it from search/category tools and gives its fields. Although it doesn't name sibling tools explicitly, the scope and exclusion of non-product pages make the purpose unambiguous.

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?

It provides an explicit 'USE THIS WHEN' block with concrete use cases and a 'DO NOT USE THIS FOR' block listing search/category pages, login/paywall, non-products, and private/internal addresses. It also tells the agent to call try_it_free first when wanting to see output before spending, naming a sibling alternative. This exceeds the bar for when-to-use guidance.

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.