Skip to main content
Glama

download_pdf_from_url

Read-only

Fetch a presigned S3 PDF URL server-side and return the document as base64.

The FALLBACK for reading a report: `get_latest_report` returns only a presigned
`url`, and fetching that link yourself (an HTTP / web fetch) is the normal way to
read the PDF. Use this only when your client cannot reach the link but can run code
to decode base64 — the result is large (~120K characters for a 5-page note, ~750K
for a 20-page report with charts) and is no use to a model that cannot decode it.
The backend fetches the URL for you and streams the PDF back. Only S3 URLs are
accepted: the host must end in "amazonaws.com" and contain "s3"; any other host is
rejected with a 400 (SSRF guard).

Returns {"file_name": ..., "media_type": "application/pdf", "report": "<base64 pdf>"}
— decode `report` to read, render, or save the PDF.

Requires auth (your MCP client attaches the OAuth bearer automatically).

Input Schema

NameRequiredDescriptionDefault
urlYesPresigned S3 link, e.g. get_latest_report's `url`. The host must end in "amazonaws.com" and contain "s3" (anything else is a 400).
file_nameYesDownload filename to label the document, e.g. "AAPL.pdf".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint annotation: it quantifies output size (~120K chars for 5 pages, ~750K for 20), discloses the SSRF guard (host must end in "amazonaws.com" and contain "s3", otherwise a 400), notes the fetch is server-side, and states OAuth is auto-attached. No output schema exists, so the explicit return shape {"file_name", "media_type", "report"} earns further credit.

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 the verb-and-resource plus the fallback role, then layers conditions, size warnings, constraints, and return shape in a sensible order. Slightly padded by repeating the S3 host rule already present in the schema, and the paragraph break mid-thought about size is a little awkward.

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 two-parameter read tool with no output schema, the description covers selection criteria, size/shape of the result, error behavior, auth handling, and the return payload — everything an agent needs to decide and call correctly. Nothing material is missing.

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%, so both parameters are already documented in the schema, including the same S3 host constraint. The description restates the URL restriction but adds no new semantics for file_name (e.g., whether it affects the returned file_name field) or for URL edge cases. Baseline 3 is appropriate when the schema does the heavy lifting.

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 presigned S3 PDF URL server-side and return the document as base64") and immediately frames its role as "The FALLBACK for reading a report." That framing distinguishes it from both get_latest_report (which only returns the URL) and a plain client-side HTTP fetch.

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?

Explicitly names the preferred path (fetching the link yourself is "the normal way to read the PDF") and states the exact conditions that select this tool: the client cannot reach the link but can run code to decode base64. It even adds a disqualifying condition — the payload is useless to a model that cannot decode it.

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