Skip to main content
Glama
pdf4me
by pdf4me

convert_url_to_pdf

Convert a web page to PDF from its URL. Specify the target URL and optional layout, page format, margins, and authentication to save the PDF locally.

Instructions

Convert a web page to PDF using the PDF4me ConvertUrlToPdf API. Required input is only web_url (https://...); no local file path is read. Optional: layout, page format, margins, scale, print background, auth (NoAuth or credentials), output_dir/output_file_name for where to save the PDF (default file name output.pdf).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scaleNoRender scale (1.0 = 100%).
layoutNoPage orientation (portrait or landscape).portrait
web_urlYesPage to render (https://...).
passwordNoOptional password when the target URL requires authentication.
usernameNoOptional username when the target URL requires authentication.
auth_typeNoSite auth mode (e.g. NoAuth; use Basic + username/password if needed).NoAuth
output_dirNoDirectory to save the PDF.
top_marginNo20px
left_marginNo20px
page_formatNoPaper size (e.g. A4, Letter, Tabloid per API docs).A4
right_marginNo20px
bottom_marginNo20px
output_file_nameNoFile name for the saved PDF.
print_backgroundNoInclude backgrounds in the PDF.
display_header_footerNoPrint browser header/footer region if supported.
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses that the input is remote (web_url), no local file is read, and the output defaults to output.pdf. However, it does not mention what the tool returns (e.g., file path, status), whether existing files are overwritten, or network/API error behavior.

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?

The description is compact and front-loaded with the primary purpose, then required input, then optional categories. Every sentence adds meaningful information without redundancy, making it efficient and easy to scan.

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?

Given 15 parameters and no output schema, the description covers core usage (required URL, optional settings, save location) but omits what the tool returns or whether it returns a file path. It also lacks information on error scenarios or prerequisite API configuration, which is a notable gap for a complex tool with no annotation support.

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 73%, so the schema already documents most parameters. The description adds useful context like 'no local file path is read' and the default output filename 'output.pdf', which is not in the schema. However, it groups parameters without adding detail on margin formats or display_header_footer, so it only partially compensates for the uncovered parameters.

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 uses a specific verb 'Convert a web page to PDF' and names the exact API ('PDF4me ConvertUrlToPdf API'). It clearly distinguishes from sibling tools like convert_html_to_pdf by stating the required input is web_url and explicitly saying 'no local file path is read'.

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?

The description provides clear context by specifying that only a web_url (https://...) is accepted and no local file path is read, implying this tool is for converting web pages rather than local files. However, it does not explicitly name alternative tools or provide exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/pdf4me/pdf4me-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server