Downloads

Host a file behind one link that survives new versions.

This is the guide the PageHub MCP server gives an AI agent for get_style_reference({ topic: "downloads" }). Names like set_theme are its tools (connect one), and the liquid topic is the HTML + Liquid reference.

set_download hosts a file behind one stable link, so a new version never breaks the pages that link to it.

  • New: set_download({ name, filePath | mediaId + filename }) (filePath is stdio only; mediaId comes from upload_file, or a chat attachment, which is moved private). New version: downloadId + a file (same link; label, notes for the changelog). Roll back: downloadId + currentVersionId. list_downloads shows the link, versions (the served one starred) and download counts; remove_download removes it or one old version. Pro and up; .exe / .dmg and similar need Agency.
  • access makes it members-only: { members: true } for any plan, { plans: ["pro"] } for those, { members: false } public.
  • Link to it with the id the tool returns: <a class="btn btn-primary" href="/api/downloads/<downloadId>" download>Get the guide</a>; a video plays from <video src="/api/downloads/<downloadId>?inline=1" controls></video>. For a plain public file (a PDF in an <a>, an <audio src>) {{ '<mediaId>' | file_url }} is enough.
  • Track clicks with data-track="ga4:guide_download" on the link. The delivery email is a site email (see emails).