Skip to main content
Glama

Upload a Local Photo

create_upload_ticket

Get a presigned upload URL for a LOCAL image file — the one case a URL can't cover. PUT the file to uploadUrl with the same Content-Type, then pass the returned r2Path to a generation tool instead of imageUrl. Ticket expires in 1 hour.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filenameYesOriginal filename, used for the extension
sizeBytesNoExact byte size of the file. Recommended: when given it is signed into the URL, so the upload is bounded server-side.
contentTypeYesMIME type the PUT request will send

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=false, destructiveHint=false), the description adds useful behavioral details: the ticket expires in 1 hour, the upload requires matching Content-Type, and the returned r2Path is used in place of imageUrl. No contradictions 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?

Three sentences, each earning its place: the local-file use case, the exact upload workflow, and the expiration caveat. The key differentiator (LOCAL) is front-loaded and the instructions are immediately 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?

With no output schema, the description compensates by naming the critical return fields (uploadUrl, r2Path) and explaining how to use them. It also covers the lifecycle (1-hour expiry), the required PUT behavior, and the integration with generation tools—everything an agent needs to invoke the tool correctly.

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 filename, sizeBytes, and contentType are already documented. The description reinforces the 'same Content-Type' requirement, which is helpful context for using contentType, but it doesn't add substantial meaning beyond the schema.

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 tool's purpose: 'Get a presigned upload URL for a LOCAL image file.' It also distinguishes it from the URL-upload sibling by calling out 'the one case a URL can't cover,' and names the relevant output fields (uploadUrl, r2Path) so an agent immediately knows what this tool produces.

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 provides explicit use context: this is for LOCAL files, not URLs, and it gives a step-by-step flow (PUT to uploadUrl with same Content-Type, then pass r2Path to a generation tool). It stops short of naming the sibling tool upload_image_from_url as the alternative, but the 'URL can't cover' phrase effectively routes the agent.

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