Skip to main content
Glama

Convert a web page or online file

convert_url
Read-onlyIdempotent

Fetch a public URL and convert what it serves - a web page, or a PDF, Word, Excel, PowerPoint, notebook, subtitle or data file - to Markdown or another format. Use this when you have a link; if you already have the content, use convert (text) or convert_file (file bytes) instead, which skip the download.

Parameters:

  • url (required): an absolute http:// or https:// URL; surrounding whitespace is trimmed. Redirects are followed. Only public addresses are fetched: private, loopback and cloud-metadata addresses are refused, also after redirects. Responses over 20 MB, or slower than 15 seconds, fail. There is no source_format parameter: the format is taken from the first of (1) the final URL's file extension (.pdf, .docx, .xlsx, ...), (2) the Content-Type header (PDF, Office or text/html), (3) the content itself, detected like convert with source_format auto. A link to a viewer page (e.g. a GitHub file page) is HTML; link to the raw file to convert the file itself.

  • target_format (default markdown): web pages (HTML) allow only markdown and text; files allow the same targets as in convert_file, and content-detected data (JSON, YAML, CSV) the same as in convert. An unsupported pair returns an error that names both formats.

  • pretty_json (default false): only relevant for target_format json, and currently has no effect - JSON output is always indented with two spaces. Ignored for other targets.

Pages that need a login or render their content with JavaScript may convert to little or nothing. Returns the converted content as text; excel and docx output is returned as an embedded resource. Read-only: the page is not stored. Requires a slim-down API key or OAuth token; rate-limited per account (default 60 calls per minute).

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

Input Schema

NameRequiredDescriptionDefault
urlYesAbsolute http or https URL of a publicly reachable page or file, e.g. https://example.com/article. Pages behind a login, and private or local network addresses, cannot be fetched.
pretty_jsonNoOnly meaningful when target_format is json. JSON output is always indented with two spaces, so true and false (default) currently give the same result; it is accepted for compatibility with the REST API. Ignored for every other target.
target_formatNoFormat to convert to. Default markdown. Allowed values depend on the detected source format: web pages allow only markdown and text; files follow the convert_file list. excel and docx come back as an embedded binary resource, all others as text.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / pretty_json / description
      Previous value: -"Only applies when target_format is json: true indents the output for readability, false (default) returns compact JSON."New value: +"Only meaningful when target_format is json. JSON output is always indented with two spaces, so true and false (default) currently give the same result; it is accepted for compatibility with the REST API. Ignored for every other target."
    • changedInput schema / properties / target_format / description
      Previous value: -"Format to convert to. Default markdown. Allowed targets depend on what the URL serves (see the tool description)."New value: +"Format to convert to. Default markdown. Allowed values depend on the detected source format: web pages allow only markdown and text; files follow the convert_file list. excel and docx come back as an embedded binary resource, all others as text."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only cover read-only/open-world/idempotent/non-destructive; the description adds the operationally decisive facts: SSRF blocking of private, loopback and metadata addresses including after redirects, 20 MB and 15 s limits, redirect following, auth via API key or OAuth, 60 calls/min rate limit, and that nothing is stored. Return shape (text vs embedded resource for excel/docx) is also disclosed, which the absent output schema requires.

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?

Front-loads purpose and the sibling routing rule, then organizes constraints under a labeled Parameters block, so it reads fast despite its length. A few clauses are redundant with the schema (e.g. the pretty_json restatement appears in both), which slightly exceeds what the definition needs.

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

Completeness5/5

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

For a network-facing conversion tool with no output schema, the description covers fetch policy, limits, auth, failure modes (login-gated and JS-rendered pages), format detection, and return representation. Nothing an agent needs to call it correctly or interpret the result is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3; the description still adds value by giving the source-format detection precedence (extension, then Content-Type, then content sniffing) and by stating there is deliberately no source_format parameter. It also explains that pretty_json is a compatibility no-op, which the schema mentions but the description reinforces with the concrete effect. The target_format error behavior is a marginal addition beyond the enum description.

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 and resource ('Fetch a public URL and convert what it serves') and enumerates the source types (web page, PDF, Word, Excel, PowerPoint, notebook, subtitle, data file) and targets. It explicitly distinguishes itself from both siblings, convert and convert_file, so the agent can route without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit selection rule: 'Use this when you have a link; if you already have the content, use convert (text) or convert_file (file bytes) instead, which skip the download.' It also warns about viewer pages vs raw file links, which is a real when-not condition an agent would otherwise get wrong.

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