Skip to main content
Glama

PDF Efforts

Web page to PDF

webpage_to_pdf
Idempotent

Open a public web page in the server's headless Chromium and save it as a PDF (print styles apply). Pages behind a login cannot be reached.

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": "webpage_to_pdf"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYesThe public http(s) address of the page.
page_sizeNoA4

Output Schema

NameRequiredDescriptionDefault
infoNoFacts about the PDF (get_pdf_info) or the result (e.g. target_met for compress_pdf).
noteNoAnything the user should know about the result.
textNoExtracted text (pdf_to_text, ocr_pdf).
filesYesResult files. Download them before expires_at; pass file_id to another tool to chain.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare openWorldHint, idempotentHint and destructiveHint=false, so the safety profile is set. The description adds real context beyond them: rendering happens in the server's own headless browser, print media styles are applied (so the output may differ from the on-screen page), and authenticated pages are out of scope. It does not cover timeouts, slow/heavy pages, or whether the PDF is written to a new file path.

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?

Two sentences, zero filler, with the core action and the key limitation both front-loaded. Nothing could be removed without losing information.

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?

An output schema exists, so return values need no explanation, and the annotations plus the Chromium/login notes cover the main behavioral questions. Only minor gaps remain (no guidance on timeouts, very large pages, or whether print styles can be disabled).

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 50%: url is documented in the schema and the description's "public http(s)" wording reinforces it, but page_size (enum with a default) is never mentioned in the description. The schema already does the work for both parameters, so the baseline 3 applies.

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 (open/save) and resource (public web page rendered to PDF) and names the rendering environment (server's headless Chromium). This clearly separates it from the file-based *_to_pdf conversion siblings that take local files rather than a URL.

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?

"Pages behind a login cannot be reached" is an explicit exclusion that tells the agent when this tool will fail, and "public web page" reinforces the precondition. It stops short of naming alternatives or saying what to do when the page is not public (e.g. save locally then convert), so it is clear but not complete.

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