Skip to main content
Glama
TMYTiMidlY

portal-mcp-server

by TMYTiMidlY

portal_transfer

Transfer files securely between local and remote servers via SFTP. Supports single file, recursive directory sync, and batch transfers with optional checksum verification to skip unchanged files.

Instructions

Transfer files between local and remote via SFTP (binary-safe, atomic).

Modes

  • direction="upload": local_path → remote_path (single file). Example: portal_transfer(direction="upload", host="web01", local_path="/tmp/app.jar", remote_path="/opt/app/app.jar")

  • direction="download": remote_path → local_path (single file). Example: portal_transfer(direction="download", host="web01", remote_path="/var/log/syslog", local_path="/tmp/syslog")

  • direction="sync": recursively sync local_path directory → remote_path directory (upload). Files already present with a matching size+mtime (or sha256 when checksum=True) are skipped.

  • direction="mirror": recursively mirror remote_path directory → local_path directory (download); the remote→local counterpart of "sync". Example: portal_transfer(direction="mirror", host="web01", remote_path="/srv/www/", local_path="./www/")

  • direction="upload-list" / "download-list": transfer an explicit list of file pairs given in paths_json (an arbitrary local→remote mapping, not a whole directory). Each pair is skipped when already present with a matching size+mtime (or sha256 when checksum=True), so re-runs only move the changed files; a single pair's failure is collected in failed[] without aborting the batch. local_path / remote_path are ignored in these modes. Example: portal_transfer(direction="upload-list", host="web01", paths_json='[{"local":"/tmp/a.conf","remote":"/etc/app/a.conf"}, {"local":"/tmp/b.conf","remote":"/etc/app/b.conf"}]')

Args: checksum: for the incremental modes (sync/mirror/upload-list/ download-list), compare files by sha256 instead of size+mtime (slower, requires sha256sum on the remote; missing remote files or an unavailable sha256sum force a re-transfer). paths_json: JSON array of {"local": ..., "remote": ...} objects, required by the upload-list / download-list modes (ignored otherwise).

Progress is reported to the MCP client during transfers.

Returns a JSON status dict. Single-file: {status, direction, host, bytes, duration_s, ...}. sync/mirror/upload-list/download-list: {status, uploaded|downloaded, skipped, failed[], bytes_total, bytes_transferred, duration_s}.

For text-only edits prefer portal_patch (hash-protected). Use portal_transfer when SFTP semantics are needed: binary files, large files, whole directory trees. Note: directory modes copy files only — symlinks and special files are skipped, and empty directories are not created on their own.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
checksumNo
directionYes
local_pathYes
paths_jsonNo
remote_pathYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

With no annotations provided, the description fully discloses behavioral traits: atomicity, binary safety, progress reporting, checksum comparison behavior, handling of missing remote files or unavailable sha256sum, and the structure of returned JSON status dict for all modes. No contradictions.

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 description is well-structured with sections (modes with examples, args, notes) and front-loaded with purpose. However, it is somewhat lengthy due to detailed examples; a slightly more condensed version could improve conciseness while retaining value.

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?

Given the tool's complexity (6 parameters, 6 modes, output schema present), the description covers all necessary aspects: return values for single-file and multi-file modes, incremental behavior, and edge cases. No obvious gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Despite 0% schema description coverage, the description defines every parameter: direction enum values with usage examples, checksum purpose, paths_json for upload-list/download-list, and local_path/remote_path explanations. It compensates completely for schema gaps.

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 explicitly states 'Transfer files between local and remote via SFTP (binary-safe, atomic)' and details six distinct modes (upload, download, sync, mirror, upload-list, download-list), clearly differentiating it from sibling tools like portal_patch or portal_exec.

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?

The description advises 'For text-only edits prefer portal_patch (hash-protected). Use portal_transfer when SFTP semantics are needed: binary files, large files, whole directory trees.' It also notes limitations (skipping symlinks/special files, empty directories not created), providing clear when-to-use and when-not-to-use guidance.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/TMYTiMidlY/portal-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server