Skip to main content
Glama

Get a file upload link

create_file_upload

Get a link to upload a local file as is (image, PDF, export…, 10 MB at most), when you have a shell: the reliable way for a binary file, instead of copying its base64 into save_file.

Same arguments as save_file, without the content: sha256 is the hash of the local file (sha256sum <path>), and only that content is accepted. Then run the returned curl command within 15 minutes, with replaced by the file: its reply is the saved version, or an error as JSON ({"error": {"code", "message", "field"}}). Nothing is saved until then.

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": {
      "space": "<space>",
      "name": "<name>",
      "sha256": "<sha256>"
    },
    "name": "create_file_upload"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesFile name in the space, extension included (e.g. “report.html”).
spaceYesSpace identifier, e.g. “k3x9p2m4ta”: the `id` field returned by list_spaces.
sha256YesSHA-256 of the content, in hexadecimal (64 characters).
descriptionNo
content_typeNo
linked_notesNo
linked_tasksNo
expected_versionNo

Output Schema

NameRequiredDescriptionDefault
curlYesReady-to-run command: replace <path> with the local file.
methodYesAlways PUT.
headersYesHeaders to send with the content, the upload token included.
expires_atYesThe link works for 15 minutes.
upload_urlYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare the crude mutation profile (readOnlyHint=false, destructiveHint=false, idempotentHint=false); the description goes well beyond them, disclosing the deferred-write semantics ('Nothing is saved until then'), the 15-minute expiry, the hash-match constraint, and the JSON error shape. It is close to complete, though it doesn't say what happens if the curl is never run or what permission/size failures look like.

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 capability and the sibling comparison in the first sentence, then the operational steps. Dense but every clause carries information; minor parenthetical clutter ('(image, PDF, export…, 10 MB at most)', '<path> replaced by the file') slightly hurts flow.

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 an 8-parameter tool with a partial schema coverage, the description supplies the workflow, the hash requirement, the time limit, and the error format; an output schema exists so return values needn't be restated. The main gap is that several optional fields are only referenced indirectly via save_file rather than explained.

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 coverage is 38%, and the description compensates meaningfully for sha256 by naming the source command (`sha256sum <path>`) and the 'only that content is accepted' constraint. The remaining parameters are covered by the shorthand 'Same arguments as save_file, without the content', which relies on the agent knowing that sibling's schema rather than explaining description, content_type, linked_notes, or expected_version directly.

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?

Specific verb and resource: 'Get a link to upload a local file as is', scoped to binaries up to 10 MB. It explicitly sets itself apart from the sibling save_file by saying it is the reliable way for a binary file 'instead of copying its base64 into save_file'.

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?

States exactly when to choose this over the alternative (you have a shell, the file is binary) and names save_file as the thing it replaces. It also gives the operating preconditions – the sha256 must match the local file and the returned curl must run within 15 minutes.

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