Skip to main content
Glama

Upload attachment

upload_attachment

Attach a small base64 file (image, PDF, dataset) to a tela page and get a serve URL, share link, and markdown snippet for insertion.

Instructions

Upload a file (base64) and attach it to a page (editor+) — an image, PDF, dataset, etc. Returns the serve URL plus a ready-to-paste markdown snippet; then call update_page or patch_page to place it in the body (images render inline as , other files as a download card). It also returns share_url — the link to give a PERSON who asks for the file, since it previews it and unfurls as a card, unlike the raw download_url. The payload is inline base64 and rides through the model's context, so it is capped at 5 MB — keep it to small files (screenshots, charts, short PDFs). For larger files use request_attachment_upload (a direct PUT URL, bytes off-context), or the tela editor (drag-drop).

Input Schema

NameRequiredDescriptionDefault
nameYesfile name including extension, e.g. report.pdf or chart.png (drives the displayed name + type detection)
page_idYespage to attach the file to
data_base64Yesthe file bytes, base64-encoded; a leading data:<mime>;base64,… URL prefix is also accepted

Output Schema

NameRequiredDescriptionDefault
attachmentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.11.0
    • addedOutput schema / properties / attachment / properties / share_path
      Added value: +{
      +  "type": "string"
      +}
    • addedOutput schema / properties / attachment / properties / share_url
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / properties / attachment / required
      Previous value: -[
      -  "id",
      -  "name",
      -  "mime",
      -  "byte_size",
      -  "hash",
      -  "url",
      -  "embedded",
      -  "download_url",
      -  "markdown"
      -]New value: +[
      +  "id",
      +  "name",
      +  "mime",
      +  "byte_size",
      +  "hash",
      +  "url",
      +  "share_path",
      +  "embedded",
      +  "download_url",
      +  "share_url",
      +  "markdown"
      +]
  2. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations (which only say this is a non-destructive write). It discloses the 5 MB cap and why it exists (base64 rides through model context), what the call returns (serve URL, markdown snippet, share_url), and the behavioral distinction between share_url (previewable, unfurls as a card, for people) and raw download_url — exactly the kind of context an agent cannot get from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and the update_page/patch_page follow-up come first, then return semantics, then the size constraint and alternatives. Every clause carries information — permission level, cap rationale, share vs download URL, fallbacks — with no filler.

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?

With full-schema parameters, annotations covering the safety profile, and an output schema handling return shape, the description fills the remaining gaps: permission requirement, size ceiling, returned artifacts, and the downstream workflow. Nothing an agent needs to invoke this 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 name/page_id/data_base64 are already fully documented, including the accepted data:URL prefix. The description adds only the 'base64, ~5MB' framing and the downstream use of the payload, so the baseline 3 is appropriate.

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+resource ('Upload a file (base64) and attach it to a page') and immediately scopes it with the required permission level (editor+). It is clearly distinguishable from the sibling upload tools (request_attachment_upload, confirm_attachment_upload) because it names them explicitly.

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 an explicit when-to-use with a concrete size threshold ('keep it to small files (screenshots, charts, short PDFs)') and names the alternatives for the excluded case: request_attachment_upload for larger files and the tela editor drag-drop. It also states the required follow-up step (call update_page or patch_page to place it).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.