Skip to main content
Glama

get_upload_url

Get a presigned URL for direct file upload. This avoids sending file data through MCP, saving tokens.

Flow:

  1. Call get_upload_url(page_id, filename, mime_type) → returns upload_url, file_id, s3_key

  2. Use Bash to upload: curl -X PUT -H 'Content-Type: <mime_type>' --upload-file /path/to/file '<upload_url>'

  3. Call confirm_upload(file_id, s3_key, filename, mime_type, page_id) → creates file record and block

The upload_url expires in 15 minutes. Supported types: images (png, jpg, gif, webp), PDFs, Office docs, text files, and email exports (.eml, .emlx, .msg, .mbox). Use the returned mime_type for the PUT Content-Type header and confirm_upload.

Input Schema

NameRequiredDescriptionDefault
page_idYesThe UUID of the page to attach the file to
filenameYesOriginal filename (e.g., 'screenshot.png')
mime_typeYesMIME type (e.g., 'image/png', 'application/pdf', 'message/rfc822', 'application/mbox', 'application/vnd.ms-outlook')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / mime_type / description
      Previous value: -"MIME type (e.g., 'image/png', 'application/pdf')"New value: +"MIME type (e.g., 'image/png', 'application/pdf', 'message/rfc822', 'application/mbox', 'application/vnd.ms-outlook')"
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it discloses the 15-minute URL expiry, that confirm_upload is what actually creates the file record and block, the supported MIME types, and that the returned mime_type must be used in the PUT header. It stops short of stating permission requirements or file size limits, so a small gap remains for a multi-step mutation.

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 is front-loaded in the first sentence, followed by a numbered flow that mirrors the actual call sequence. The expiry note and supported-types list are compact and each sentence carries operational information; nothing is redundant.

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?

Although there is no output schema, the description names the returned fields (upload_url, file_id, s3_key) and describes the downstream shell command and follow-up call, so the agent knows both what comes back and what to do with it. Complete for a three-parameter, multi-step tool.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real value beyond the schema: it names the exact call signature get_upload_url(page_id, filename, mime_type), enumerates the supported file type families, and explains that mime_type drives the PUT Content-Type header. This is meaning the schema alone does not convey.

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 gives a specific verb and resource ('Get a presigned URL for direct file upload') and immediately distinguishes the approach from its alternative ('avoids sending file data through MCP, saving tokens'). An agent can separate this from get_image_url, get_file_text, or confirm_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?

It lays out an explicit three-step workflow with the exact arguments for each call, names the sibling tool confirm_upload that must follow, and states the trade-off (token savings) that motivates choosing this path over in-band upload. There is no inference required about when to use it.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources