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: ' --upload-file /path/to/file ''

  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.

Input Schema

TableJSON 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')

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are present, so the description bears the full burden. It discloses the return payload, the 15-minute URL expiry, supported MIME types, and the required follow-up step (confirm_upload), which is substantial behavioral detail. It does not cover failure modes or permission requirements, but those are secondary for this tool.

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?

The purpose is stated in the first sentence, followed by a compact numbered flow and constraint notes. No sentence is filler; even the curl example and expiry are actionable.

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?

For a tool with no output schema and no annotations, the description fully covers inputs, outputs, the required follow-up, expiry, and type restrictions. An agent has everything needed to call it and complete the upload workflow.

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?

The schema already documents all three parameters with examples (100% coverage), so the baseline is 3. The description adds value by constraining mime_type to supported types (png, jpg, gif, webp, PDFs, Office docs) and by showing exactly how filename and mime_type are used in the curl invocation.

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 precise outcome—obtaining a presigned URL for direct file upload—and distinguishes itself from confirm_upload by framing this as phase 1 of a three-step upload flow. The resource (file upload) and key return values (upload_url, file_id, s3_key) are explicit.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description gives clear context: use when uploading file data without sending it through MCP, and pairs it with Bash curl and confirm_upload as the follow-up. It does not explicitly name the alternative upload path or state when not to use it, so it falls short of a full when/when-not specification.

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