Skip to main content
Glama

Convert a website or HTML to PDF

render_pdf
Destructive

Convert a URL or HTML to PDF with page size, orientation, margins, headers and footers. Returns the PDF URL. One render can also save the page's markdown, HTML and metadata: set save_markdown, save_html or save_metadata instead of making a second call. The markdown and metadata come back with the result. Any other Urlbox option (proxies, cookies, headers, user agent and many more) goes in options: look it up with describe_options.

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": {
      "intent": "<intent>"
    },
    "name": "render_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlNoThe URL or domain of the website you want to screenshot. We will automatically prepend http:// if it is missing.
htmlNoHTML to render instead of a URL (HTML to PDF, HTML to image).
delayNoThe amount of time to wait before Urlbox captures a render in milliseconds.
mediaNoBy default, when generating a PDF, the print CSS media query is used. To generate a PDF using the screen CSS, set this option to screen. When generating an image, the screen CSS media query is used by default. To generate an image using the print CSS, set this option to print.
widthNoThe viewport width of the browser, in pixels.
intentYesRequired. In one or two sentences, what you are trying to achieve for the user with this call and why (for example: 'Screenshot the pricing page so the user can compare plans'). Recorded for analytics and audit; do not include secrets.
optionsNoAny other Urlbox render option by name, e.g. { "gpu": true }. For an option this tool doesn't list, look it up with describe_options first (it covers every option); don't search the web. Validated by the Urlbox API.
projectNoProject id (proj_…) or exact name to render with. Defaults to your default project.
readableNoMake the pdf into a readable document by removing unnecessary elements such as navigation bars, ads, etc.
wait_forNoWaits for the element specified by this selector to be present in the DOM before taking a screenshot or PDF. By default, Urlbox will take a screenshot or PDF if the wait_for element is not found after waiting for the time specified by the wait_timeout option. If you prefer Urlbox to fail the request when the wait_for element is not found, pass fail_if_selector_missing=true
block_adsNoBlocks requests from popular advertising networks from loading.
pdf_scaleNoSets the scale factor of the website content in the PDF. Valid values are numbers between 0.1 and 2. Range: 0.1 - 2.
save_htmlNoAlso save the page's rendered HTML.
pdf_footerNoChange the default pdf footer that is shown on each page of the pdf when pdf_show_footer option is set. You have the option to show the following variables in the footer (or header) of the pdf: current date; title of the page; url of the page; current pageNumber; the totalPages in the pdf document; You can display these variables by creating empty divs or spans, with special css class names relating to the variable you want to show. For example, if you want to show the date followed by the url, you could use the following pdf footer template: <div class="date"></div><div class="url"></div>. The pdf footer template you set are inserted as the innerHTML of a parent div which is a flex container, and has align-items set to flex-end. There are also some helper classes for aligning the divs or spans. The following classes are available: left - adds some left padding to the element and sets flex: none.; center - aligns the element and text to the center.; right - adds some right padding to the element and sets flex: none.; text - sets the text to 8pt.; grow - sets flex: auto on the element, allowing it to grow to fill the available space.; The default pdf footer is: <div class='url text left grow'></div><div class='text right'><span class='pageNumber'></span>/<span class='totalPages'></span></div>. You can see exactly how the pdf page is constructed by looking at the chromium pdf template in the chromium source repository.
pdf_headerNoChange the default pdf header that is shown on each page of the pdf when pdf_show_header option is set. You have the option to show the following variables in the header (or footer) of the pdf: current date; title of the page; url of the page; current pageNumber; the totalPages in the pdf document; You can display these variables by creating empty divs or spans, with special css class names relating to the variable you want to show. For example, if you want to show the date followed by the url, you could use the following pdf header template: <div class="date"></div><div class="url"></div>. The pdf header template you set are inserted as the innerHTML of a parent div which is a flex container, and has align-items set to flex-start. There are also some helper classes for aligning the divs or spans. The following classes are available: left - adds some left padding to the element and sets flex: none.; center - aligns the element and text to the center.; right - adds some right padding to the element and sets flex: none.; text - sets the text to 8pt.; grow - sets flex: auto on the element, allowing it to grow to fill the available space.; The default pdf header is: <div class='date text left'></div><div class='title text center'></div>. You can see exactly how the pdf page is constructed by looking at the chromium pdf template in the chromium source repository.
pdf_marginNoSets the margin of the PDF document. One of: none, default, minimum.
wait_untilNoWaits until the specified DOM event has fired before capturing a render. The available options are: domloaded (the DOMContentLoaded event is fired); mostrequestsfinished (consider navigation to be finished when there are no more than 2 network connections for at least 500 ms); requestsfinished (there are no more than 0 network connections for at least 500 ms); loaded (the load event is fired); One of: domloaded, mostrequestsfinished, requestsfinished, loaded.
click_acceptNoSimilar to the hide_cookie_banners option, but instead of hiding the banners, this option attempts to click on the 'Accept' button, in order to accept cookies.
wait_secondsNoHow long to wait for the render before returning. 0 queues it and returns a render id at once. If the wait runs out the render keeps going; fetch it with get_render.
hide_selectorNoHide specific HTML elements on the page before rendering. This option accepts a comma-delimited string of CSS element selectors that will be hidden by setting their style to visibility: hidden !important; pointer-events: none !important;. This preserves the page layout while making elements invisible. This is particularly useful for: Hiding pop-ups, banners, or cookie notices; Removing advertisements or promotional overlays; Excluding navigation menus or sidebars; Hiding specific content sections; Selector types supported: Element selectors (e.g., h1, div, img) - Hide all elements of that type; Class selectors (e.g., .popup, .banner) - Hide elements with specific CSS classes; ID selectors (e.g., #header, #sidebar) - Hide elements with specific IDs; Complex selectors (e.g., .nav ul li, div.content > p) - Use any valid CSS selector; Multiple selectors - Combine multiple selectors with commas; Tip: To find the selector for any element, open your browser's DevTools, right-click the element in the Elements tab, and select "Copy > Copy selector".
pdf_page_sizeNoSets the PDF page size. Setting this option will take precedence over pdf_page_width and pdf_page_height. One of: A0, A1, A2, A3, A4, A5, A6, Legal, Letter, Ledger, Tabloid.
save_markdownNoAlso extract and save the page as Markdown alongside the render.
save_metadataNoAlso extract and save page metadata (title, description, OpenGraph, etc.).
pdf_backgroundNoSets whether to print background images in the PDF
pdf_orientationNoSets the orientation of the PDF. One of: portrait, landscape.
pdf_show_footerNoWhether to show the default pdf footer on each page of the pdf. The template of the footer can be changed by setting the pdf_footer option.
pdf_show_headerNoWhether to show the default pdf header on each page of the pdf. The template of the header can be changed by setting the pdf_header option.
hide_cookie_bannersNoAutomatically hides cookie banners from most websites, by setting their style to display: none !important;

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare openWorldHint, non-idempotent and destructive behavior, so the description's job is supplementary; it does add that the PDF URL is returned and that markdown/metadata come back in the same result. However, it never addresses cost/credits, that a render is queued and can outlive the call, or what 'save_*' actually writes or where — meaningful gaps for a tool annotated destructiveHint=true.

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?

Five sentences, front-loaded with the core action and the return value, followed by the multi-output tip and the fallback-options routing. Nothing is redundant, though the 'page size, orientation, margins, headers and footers' enumeration partly duplicates what the schema labels already convey.

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?

Given 28 parameters, nested `options`, and no output schema, the description does what matters: it states the return value and how the extra saved artifacts surface. Remaining gaps (async queueing behavior, credit consumption, permissions) are partially covered by the wait_seconds schema text, so an agent is not blocked.

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% across 28 parameters, so the schema already carries the per-parameter semantics and the description only names a few of them at a high level. The one piece of added meaning is the framing of `options` as an escape hatch plus the pointer to describe_options, which is genuinely useful but narrow against the schema's breadth.

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?

Opens with a specific verb and resource: 'Convert a URL or HTML to PDF', then enumerates the aspects it controls (page size, orientation, margins, headers, footers). It is clear on its own, though it never contrasts itself with the generic `render` or `render_html` siblings, so an agent must infer that this is the PDF-specific variant.

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?

Gives actionable context: use save_markdown/save_html/save_metadata instead of making a second call, and route unlisted options through `options`/describe_options rather than web search. It stops short of explaining when to pick this over `render` or `render_screenshot`, and there are no explicit exclusions.

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.