share
Upload bytes, get a viewable URL back.
When to use
Call share whenever you want to give the user a viewable URL for bytes the agent has produced — Markdown, notebooks, CSVs, images, code, or any other file.
Example user prompts
- Send me the generated report as a pail link.
- Share the migration log with me as Markdown.
- Upload the CSV you just created so I can open it on my phone.
MCP tool signature
upload_content(
filename: str,
text: str | None = None, # UTF-8 text; no encoding tax
content_b64: str | None = None, # base64 for binary files
project: str | None = None,
mime_type: str | None = None,
ttl_hours: int | None = None,
access_token: str | None = None,
max_views: int | None = None,
notes: str | None = None,
) -> Share
upload_folder(
folder_b64_targz: str,
root_name: str | None = None,
project: str | None = None,
ttl_hours: int | None = None,
) -> Share
# Read-only helpers (no action cost)
list_shares(limit?, offset?) -> [Share]
get_share(share_id) -> Share
revoke_share(share_id) -> None
get_share_stats(share_id) -> ShareStats
Example call
# Share a Markdown file (text path — no encoding tax)
result = upload_content(
filename="plan.md",
text="# Deploy plan\n\nStep 1: ...",
)
print(result["url"]) # https://pail.thalos.ai/aB3xQ9zKpL
Return value
Returns a Share object containing id, url, expires_at, filename, size_bytes, and views. The url field is the public URL the user can open directly.
Credit cost
1 action per create call. Reads (list_shares, get_share, etc.) are free.
Recipes
See all recipes for copy-paste patterns
that use share and other tools together.