Skip to main content
Glama

Price a batch

quote_batch
Read-onlyIdempotent

What that submission would cost at most, without submitting it. maxCost prices every URL at the ceiling one page could reach. The real bill comes in lower by every page that never needed a browser and by every outcome that costs nothing: a page the site blocked or our policy refused (unless your own browser.actions script ran in it first) and anything we broke. Bandwidth is on top and cannot be quoted, because it depends on what the pages weigh.

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": {
      "urls": "<urls>"
    },
    "name": "quote_batch"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlsYesThe pages to read, in the order you want them back. How many one batch may carry depends on your plan. Duplicates are kept: position, not URL, is what lines results up against what you submitted.
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.
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.
webhookNoCall this URL instead of making you poll. The signing secret is returned once, when the batch is created.
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.7/5.0
Behavior4/5

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

Annotations already cover the read-only, idempotent, non-destructive profile, and the description adds genuinely new behavior: the quote is a ceiling, blocked/refused/broken outcomes are free unless a `browser.actions` script already ran, and bandwidth is uncosted. That number would otherwise be surprising (quote exceeding final bill), so the disclosure has real value; it stops short of describing the response shape or whether any credits are consumed by the quote call itself.

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 promise ('what that submission would cost at most, without submitting it') before the pricing caveats. Dense but every clause carries pricing information; the parenthetical about `browser.actions` is the only slightly nested construction.

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

Completeness4/5

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

For a read-only quoting tool with a fully documented schema and annotation coverage, the description supplies what structured fields cannot: the ceiling-vs-actual billing model and the fact that bandwidth is unquotable. It does not state that the accepted parameters mirror the submission tool, nor describe the response beyond `maxCost`, which is a modest gap given there is no output schema.

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 description coverage is 100%, including detailed per-parameter explanations for `engine`, `retry`, `escalate`, `maxAge` and `browser.actions`, so the schema carries the burden. The description adds meaning only for the pricing interaction of `browser.actions` and `engine`, which is useful but narrow given 16 parameters; baseline 3 applies.

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 description states a specific outcome: an upper-bound cost estimate for a batch submission, without submitting it, and names the returned field (`maxCost`). It is clear what the tool does, though it never explicitly ties itself to the batch family (create_batch / quote_scrape / quote_map) by name, so sibling differentiation rests on the tool name and the phrase 'that submission'.

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

Usage Guidelines3/5

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

The phrase 'without submitting it' implies the pre-flight use case (quote before create_batch), but no explicit when-to-use or when-not-to-use rule is given, and the sibling quote tools (quote_scrape, quote_map, quote_session) are not referenced. Usage is inferable but not directed.

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