Skip to main content
Glama

Request a direct upload URL

request_attachment_upload

Get a short-lived signed PUT URL so the host can upload raw file bytes without routing them through model context, for files over 5 MB or to avoid context bloat.

Instructions

Get a short-lived signed PUT URL to upload a file WITHOUT sending its bytes through the model context — for files over upload_attachment's 5 MB inline cap, or to avoid context bloat. Flow: call this → the host PUTs the raw bytes to the returned put_url over HTTP → then either read that PUT response or call confirm_attachment_upload to get the embed snippet (and share_url, the link for a person), and place it with update_page/patch_page. Editor+. Only works on hosts that can make an outbound HTTP PUT; otherwise use upload_attachment.

Input Schema

NameRequiredDescriptionDefault
mimeNooptional content-type hint; for images the server still trusts magic bytes
nameYesfile name including extension, e.g. deck.pdf or photo.png
page_idYespage to attach the file to

Output Schema

NameRequiredDescriptionDefault
uploadYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only cover the safety profile (readOnly=false, destructive=false, openWorld=false). The description goes well beyond them: the URL is short-lived, bytes never traverse model context, the exact call sequence (this → host PUT → read response or confirm_attachment_upload), the permission level, and the host's outbound-PUT requirement.

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-loads the purpose and constraint before the flow, and every clause carries information (limits, ordering, alternatives, prerequisites). It is dense and runs long as a single block, but nothing is wasted.

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 an output schema present, return values need no prose explanation. The description still supplies everything an agent needs to act correctly: prerequisites, sequencing, the follow-up tool, and where the resulting snippet goes (update_page/patch_page).

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 description coverage is 100%, so all three parameters (name, page_id, mime) are already documented in the schema. The description references put_url/share_url, which are outputs rather than inputs, and adds no syntax or format detail for the parameters themselves. 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 and resource ('Get a short-lived signed PUT URL to upload a file') and immediately differentiates itself from the sibling upload_attachment by the 5 MB inline cap and context-bloat rationale. An agent can distinguish it from upload_attachment and confirm_attachment_upload without opening any 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?

Explicit selection criteria: use this for files over upload_attachment's 5 MB inline cap or to avoid context bloat. It also names the fallback ('otherwise use upload_attachment') and the host capability prerequisite, plus the Editor+ requirement.

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