Skip to main content
Glama

Price a scrape

quote_scrape
Read-onlyIdempotent

What the same request would cost, without making it. Free, and refused by the same guards a real call meets, so a quote is never a price for a call that would be denied. maxCost is the ceiling: for auto it is the browser's price, which is only charged if the page turns out to need one. With maxAge, the quote is the price of reading the page now; if a copy is there, the page costs nothing and only extract is charged.

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": {
      "url": "<url>"
    },
    "name": "quote_scrape"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe page to read. An http(s) URL. Private and loopback hosts are refused.
bodyNoWhat a POST sends, at most 64 KB. Set its type in `headers`: `{"content-type": "application/json"}` for JSON, or `application/x-www-form-urlencoded` for a form. If the site redirects, a 301, 302 or 303 reads the next page with GET and without the body; a 307 or 308 sends it again only if the protocol, host and port stay the same, and otherwise stops and names the new address.
proxyNoWhere the request leaves from. Defaults to the managed residential pool.
retryNoHow many extra tries to give a page the site blocks, each from a different address. 0 (the default) takes the site's first no as the answer. A blocked page costs nothing, so a try that is blocked again is free, but it takes as long as the first one did, so the call can run that many times longer. Once your `browser.actions` steps click, type, press a key or run a script on a page, it is not tried again, so nothing is done twice. If one of your scripts ran in it, the block is charged.
engineNoHow to read it. "fetch" is a plain HTTP request; "browser" renders the page in a real Chromium; "auto" (the default) fetches first and escalates to the browser when the body turns out to be a JavaScript shell, billing whichever engine answered. A POST and "raw" always use "fetch", so leave it out for them.
expectNoWhat the page should answer with. Set `"json"` when you are reading an API: anything else that comes back (a maintenance notice, a "checking your browser" page, a login form) is then not your answer. It costs nothing, and we try again from another address instead of handing you a page you cannot parse. Without it, whatever the page returns is your answer.
maxAgeNoThe oldest copy of the page you accept, in milliseconds, up to 3600000 (one hour). If we still hold a copy of the same URL that your account read within that time, from the same country and with the same engine, you get it back for 0 credits and the answer says `cached: true`. If not, we read the page now and keep a copy for up to an hour, unless the page still needs JavaScript (`metadata.needsJs`). We may drop a copy sooner, to make room or on a deploy, and a batch keeps its own copies, apart from single calls. `0` always reads the page now, and keeps the copy for the calls after it. `extract` is still charged, because the model reads the copy again. Leave `maxAge` out to read the page fresh every time. A POST, or a call with `headers`, your own proxy, `browser` options, a screenshot, a PDF, `raw` or `escalate: false`, is always read fresh.
methodNoThe HTTP method. "POST" sends `body` to the URL, for a search form or a JSON query. It is sent once: never retried and never sent again another way, because sending it twice could repeat what it did.GET
browserNoHow to render it. Only the browser engine reads these. With `auto` they apply if the page turns out to need one, except `actions`, which always use the browser.
extractNoWhat to pull out of the page, for the "extract" format. A model reads the page and fills in the shape you asked for. Give it a JSON Schema, a sentence, or both. It reads what the page says; it does not do arithmetic over it, so ask for the numbers and add them up in your own code.
formatsNoWhat to hand back. "screenshot" and "pdf" come back as base64 and need the browser engine; asking for both costs no more than one. "extract" is the page read into fields by a model, and needs an `extract` block saying which ones. A link to a PDF or a Word (.docx) file is read into text, so the text formats work on it too. We read files up to 25 MB, and from a PDF the first 200 pages and the first 5 million characters. Reading a file costs what the engine costs: 1 credit with fetch, 5 with the browser. A Word file that holds more than 32 MB once unzipped answers FILE_TOO_LARGE, and a file link that answers a short web page instead of the file answers UPSTREAM_BLOCKED, both at no charge. A dead link is the exception: its 404 or 410 page is the site's answer, and comes back with that status at the fetch price. "raw" is the file exactly as the site sent it, as base64 with its content type: a PDF report, an image, a spreadsheet. It uses the fetch engine and holds up to 5 MB; a larger file answers FILE_TOO_LARGE at no charge, never cut short.
headersNoExtra request headers to send to the page, such as an authorization token, a cookie or a custom user agent. The connection's own headers cannot be set.
escalateNoWhether to try again a different way when the first attempt is blocked. On by default. `false` stops after one try. The site's refusal is your answer, and it costs nothing, unless your own `browser.actions` script ran in the page first. It is how you bound a call: with `auto`, trying again is what charges the browser price instead of the fetch one. A POST is sent once, so it is off for a POST.
timeoutMsNoHow long to give the page before giving up, in milliseconds. A page that never arrives costs nothing, unless your own `browser.actions` script ran in the page first.
excludeTagsNoCSS selectors for the parts of the page to leave out of `markdown`, `text` and `extract`, such as `[".comments", "#newsletter"]`. Up to 20 selectors, 256 characters each.
includeTagsNoCSS selectors for the parts of the page to keep, such as `["h1", ".price"]`. `markdown`, `text` and `extract` then hold only what they match, in page order, and `onlyMainContent` no longer applies. Hidden parts are never kept. Up to 20 selectors, 256 characters each.
onlyMainContentNoRead only the page's main content into `markdown`, `text` and `extract`: the article or the product, without the menus, ads and related links around it. On by default. Set `false` for the whole page. When the main content is under 50 words, you get the whole page instead. `html` and `links` always hold the whole page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent and non-destructive, so the description's job is to explain pricing behaviour — and it does: free execution, guard parity with the real call, `maxCost` as a ceiling whose meaning changes for `auto`, and the rule that a cache hit makes the page free while `extract` is still billed. Notably it describes a `maxCost` parameter that does not exist anywhere in the input schema, which is a real defect an agent could act on.

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?

Four sentences, front-loaded with the core definition and with no filler. The `maxCost` and `maxAge` clauses are dense but each carries a distinct pricing rule; the only waste is the reference to a parameter that does not exist.

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?

This is a 17-parameter tool with nested objects and no output schema, and the description never says it accepts the same argument set as `scrape`, nor what the returned quote looks like (a credit figure, a breakdown, error codes). The pricing explanation is good, but for a tool this wide the definition leaves an agent guessing at both the input relationship and the response shape.

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 coverage is 100%, so the schema already carries the parameter burden and the baseline is 3. The description does add genuine pricing semantics for `maxAge` (a cached copy costs nothing, `extract` still charged), but the only other parameter it discusses, `maxCost`, is absent from the schema, so the added detail is partly unusable.

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?

The opening sentence states a specific operation — returning the cost of a request without performing it — which is a real distinction from the sibling `scrape`. It never names `scrape` outright, relying on 'the same request' to make the connection, so the disambiguation is inferred rather than stated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives a clear condition for use (price a call before making it) and a reason (free, and it is refused by the same guards, so a quote never covers a call that would be denied). It does not name an alternative tool or state when a quote should be skipped in favour of calling `scrape` directly.

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.

Resources