download_pdf_from_url
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
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Presigned 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_name | Yes | Download filename to label the document, e.g. "AAPL.pdf". |