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.

Use this to pull the actual PDF bytes for a presigned S3 link — e.g. the `url`
returned by `get_latest_report` — on clients that can't open the link directly and
need the document inline. The backend fetches the URL for you (clients never have
to reach S3) 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). NOTE: if you already have `get_latest_report`'s `report` field (the same PDF
inline as base64), use that directly — there's no need to call this.

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

TableJSON 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?

Annotations only declare readOnlyHint=true, but the description adds substantial behavior: the fetch happens server-side, only S3 hosts ending in amazonaws.com are accepted, other hosts get a 400 (SSRF guard), and OAuth auth is attached automatically. This is meaningful disclosure well beyond the annotation.

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-loaded with the core action and return type, then layers the SSRF guard, alternative routing, and auth note. All sentences earn their place, though there is mild redundancy with the schema's own url description.

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 2-parameter tool with no output schema, the description fully specifies the return shape ({file_name, media_type, report} as base64), the auth model, and the rejection behavior. Nothing an agent needs to call it correctly 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 coverage is 100%, so both parameters are already documented, and the description largely restates the url constraint (presigned S3, amazonaws.com) that the schema already carries. The baseline 3 applies since the schema does the heavy lifting and the description adds little new parameter syntax.

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 (fetch/download) and resource (presigned S3 PDF URL), and describes the return (base64 document). It explicitly distinguishes itself from the sibling get_latest_report, so an agent can tell them apart 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 explicit when-to-use (clients that can't open the link directly and need the document inline) and, rarer still, an explicit when-not-to (if you already have get_latest_report's report field, use it directly). It names the alternative and the condition selecting 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