Skip to main content
Glama

upload_file

Upload a single local file to a remote server over an existing SSH/SFTP session, with policy checks and optional overwrite, returning path, byte count, and SHA-256.

Instructions

Uploads one regular file from this computer to a remote server over SSH (SFTP), through an already-open session (see open_session). Use this instead of scp, sftp or rsync. To move a directory, tar it first. The transfer is checked against the host's access policy and may be denied (POLICY_DENIED) or pause while the user is asked to approve it. An existing remote file is never replaced unless overwrite is true (DESTINATION_EXISTS). Returns the resolved remote path, the byte count and the SHA-256 of what was sent.

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

Input Schema

NameRequiredDescriptionDefault
localPathYesAbsolute path of the file on this computer to upload.
overwriteNoReplace the remote file if it exists. Defaults to false.
sessionIdYesThe sessionId returned by open_session.
remotePathYesPath on the server: absolute, relative to the session's current directory, or starting with ~/ for the login user's home.
descriptionNoOne short sentence for the user: what this does and why. Shown in the approval window next to the exact command, which is what the user judges; it does not change what is allowed. Recommended for chained or long commands.
timeoutSecondsNoHow long the transfer may take before it is aborted and any partial file removed. Defaults to 300; clamped to a maximum of 600.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so: access-policy check with POLICY_DENIED outcome, a possible pause for user approval, non-replacement of existing files unless overwrite is true with DESTINATION_EXISTS, and the returned payload (resolved remote path, byte count, SHA-256). These are exactly the behavioral traits an agent needs before committing to a write over a live session.

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?

Roughly four sentences, front-loaded with what the tool does and the prerequisite, then failure modes, then return values. Every sentence adds information: substitution guidance, directory caveat, policy/approval behavior, overwrite rule, return payload.

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 six-parameter mutation tool with no annotations and no output schema, the description covers prerequisites, failure outcomes, overwrite semantics and the shape of the return value. An agent can call it correctly and interpret the result without consulting anything else.

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 every one of the six parameters is already documented, including overwrite, path resolution and the timeout/partial-file behavior. The description reinforces overwrite semantics but adds no syntax or format detail the schema lacks, so it lands at the baseline 3.

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 specific verb (Uploads), an exact resource (one regular file from this computer to a remote server), the transport (SSH/SFTP) and the precondition (already-open session). It also names the siblings/alternatives it replaces (scp, sftp, rsync) and points to open_session, so an agent can separate it from download_file without opening a schema.

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?

Explicit prerequisites ("through an already-open session (see open_session)"), explicit substitution guidance ("Use this instead of scp, sftp or rsync"), and an explicit exclusion with workaround ("To move a directory, tar it first"). Nothing about when to choose this vs. alternatives is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.