Skip to main content
Glama

Upload a local file

create_upload

Get a one-time URL for uploading a local file. Then PUT the raw bytes to uploadUrl with the Content-Type header set to the returned contentType (for example: curl -X PUT "$uploadUrl" -H "Content-Type: $contentType" --data-binary @photo.png), and pass the returned fileUrl as imageUrl or videoUrl. Free.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "extension": "<extension>",
      "size": "<size>"
    },
    "name": "create_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
sizeYesThe file's exact size in bytes. The upload is refused if it sends any other number of bytes.
extensionYesThe file's extension, for example png, jpg, webp or mp4.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, idempotentHint=false and destructiveHint=false, so the safety profile is covered structurally. The description goes beyond that by disclosing the one-time nature of the URL, the exact byte-count requirement enforced on upload, the required Content-Type header, and the cost ('Free'). Remaining gaps are expiry duration and any per-file size ceiling, which an agent would have to discover by trial.

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?

The purpose is front-loaded in the first clause, followed by the actionable protocol. The inline curl example is dense but earns its place by removing ambiguity about the PUT call. The single long run-on sentence chain is the only structural weakness; splitting the workflow into steps would read better.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter, non-idempotent upload-broker tool with no output schema, the description covers the essential contract: what it returns, how to use those returns, and what to do with the resulting URL downstream. Missing pieces are secondary, such as URL expiry and any extension whitelist or size limit.

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 both inputs (extension, size) are already fully documented, including the exact-bytes enforcement on size. The description adds no additional meaning about those inputs beyond what the schema states. Its real added value, mapping the returned fileUrl into imageUrl/videoUrl on other tools, is output semantics rather than input parameter semantics.

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 opens with a specific verb and resource: 'Get a one-time URL for uploading a local file.' That is clearly distinct from the sibling tools, which manipulate images/video server-side rather than broker an upload. An agent can immediately tell this is the entry point for bringing local bytes into the system.

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?

It gives concrete usage context: call this first, then PUT raw bytes to the returned uploadUrl with the specified Content-Type, then pass fileUrl as imageUrl or videoUrl. This makes the tool's place in a two-step workflow unambiguous. It stops short of explicit when-not guidance (e.g., when to reuse an existing URL instead of re-uploading), so it is strong but not exhaustive.

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