Skip to main content
Glama

Upload a file to F2H

upload_file

Uploads a file to the person's F2H account and returns its link (a download page anyone with the link can open). Three ways: (1) content: the file itself, up to 1 MB, as text or base64, when you made it in this conversation and have its bytes (not an image you generated and only showed: you cannot pass that one); it uploads at once. (2) size (and path): for a file on a machine where you can run bash; you get a command that sends it straight to F2H's storage, in 8 MB parts, for files of any size the account allows. (3) neither: when you cannot run commands and the file is the person's, you get the page where they upload it themselves; then call list_my_files. Files expire after expires_in_days, 30 by default; pass another number if the person asks, or 0 to keep it until they delete it. id is the file's id for set_sharing and organize_files, once the file is there. shareText is a ready line with the link, to pass on as it is when the person wants to send it to someone. Pass qr true when a QR code of the link helps (the person wants to open it on their phone or show it to someone nearby, or asks for one) and your app shows images that tools return to the person. Then show the image with a line saying it opens the link when scanned with a phone camera. If your app cannot show it, give the link and do not mention a QR code. Docs: https://f2h.io/en/agents

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": {
      "name": "<name>"
    },
    "name": "upload_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
qrNoAlso return a QR code image of the link, for opening it on a phone
nameYesThe file name, with its extension
pathNoThe file's absolute path on your machine, to fill in the command (way 2); F2H never reads it
sizeNoThe file size in bytes, exactly (way 2)
contentNoThe file itself, up to 1 MB (way 1)
encodingNoHow content is written: text (UTF-8, the default) or base64
folder_idNoThe folder to upload into, from an earlier answer; leave it out for the top of the account
expires_in_daysNoDays until the file is deleted; 30 by default, 0 for never

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare this is a non-read-only, non-destructive, open-world, non-idempotent operation. The description adds substantial behavior beyond that: the 1 MB content cap, 8 MB multipart upload command path, default 30-day expiry with 0 for permanent files, public-link semantics, and the follow-up ids and shareText/QR handling.

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 definition is long but front-loaded and organized around the three numbered upload modes, which suits an 8-parameter tool with multiple paths. Some phrasing is wordy, such as the parenthetical about generated images, but most sentences carry useful operational detail rather than filler.

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 complex upload tool with no output schema, the description covers the returned link, id, shareText, and optional QR image, plus expiration and follow-up tool usage. Combined with the annotations, an agent has enough information to select the right mode and use the result correctly.

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 description coverage is 100%, so the per-parameter documentation is already present. The description still adds meaning by explaining the cross-parameter choice among content, size/path, and neither, and by giving concrete conditions for qr and expiry choices beyond the schema's field-level text.

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?

Opens with a specific verb and resource: 'Uploads a file to the person's F2H account', and states the key return artifact, its link/download page. It then enumerates the three supported upload paths, making the tool's scope clear without needing to inspect sibling schemas.

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?

Explicitly maps each mode to a condition: use content when the file was made in the conversation and its bytes are available, use size/path when bash is available, and use neither when commands cannot run and the file belongs to the person, followed by list_my_files. It also gives clear when-to-use guidance for qr and expires_in_days.

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