Skip to main content
Glama

Upload attachment

upload_attachment

Upload a small file (≤5MB) to a wiki page, then use the returned markdown snippet to embed images inline or add download cards.

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). 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

TableJSON 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

TableJSON Schema
NameRequiredDescriptionDefault
attachmentYes
Behavior5/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false), the description discloses that the payload is inline base64 and rides through context, capping at 5 MB. Also states the return values (serve URL and markdown snippet) and how attachments render (images inline, other files as download card). No contradiction with annotations.

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?

Four sentences with no redundancy. The first sentence captures the core action and return, the second explains the workflow, the third gives the size constraint, and the fourth provides alternatives. Front-loaded and efficient.

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?

The tool has an output schema, so return values are documented. The description covers the input, size limitation, integration step (update_page), and alternatives. For a file upload tool with moderate complexity, this is fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% for all three parameters. The description adds value by explaining that 'name' drives the displayed name and type detection, and that 'data_base64' accepts a data URL prefix. It also ties the 5 MB limit to the payload parameter, which is critical for agent decision-making.

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?

The description clearly states the action: 'Upload a file (base64) and attach it to a page'. It specifies the supported file types (image, PDF, dataset) and distinguishes from siblings like request_attachment_upload for larger files. The verb 'upload' combined with the resource 'attachment' and page context leaves no ambiguity.

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?

Explicit guidance on when to use this tool (small files up to 5 MB) and when to use alternatives (larger files use request_attachment_upload or editor drag-drop). Also explains the follow-up step: call update_page or patch_page to place the attachment in the body. No confusion about prerequisites or context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zcag/tela'

If you have feedback or need assistance with the MCP directory API, please join our Discord server