Skip to main content
Glama
mcp-multi-ssh

mcp-multi-ssh

by hl9020

sftp_write_file

Write text or binary files directly to a remote host over SFTP, avoiding shell escaping and size limits for large or multi-line content.

Instructions

Write a file to a remote host via SFTP (stream-based, no shell). Use this for large or multi-line files where shell heredoc/echo would break on escaping or size limits. For text pass plain content; for binary set encoding to 'base64'.

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": {
      "connectionId": "<connectionId>",
      "remotePath": "<remotePath>",
      "content": "<content>"
    },
    "name": "sftp_write_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
contentYesFile content
encodingNoContent encoding: 'utf8' (default) or 'base64' for binary
remotePathYesAbsolute remote file path
connectionIdYesSSH connection ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.17

TDQS

A3.9/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden. It usefully discloses the transport ('stream-based, no shell') and the escaping/size rationale, but for a write operation it never states whether an existing remote file is overwritten or appended, whether parent directories are created, what permissions result, or what the call returns.

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?

Three short sentences with zero waste, and the purpose plus the differentiator are front-loaded before the encoding note. Every sentence contributes distinct information.

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

Completeness3/5

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

The description covers purpose, use case, and encoding choice, and the schema is fully documented. However, for a mutation tool with no annotations and no output schema, the omission of overwrite/idempotency behavior and error conditions leaves a meaningful gap an agent would want closed.

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 all four parameters are already documented, including the utf8/base64 enum. The sentence 'For text pass plain content; for binary set encoding to base64' only restates that enum choice and adds no new syntax, default, or constraint information beyond the schema.

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 states a specific verb and resource ('Write a file to a remote host via SFTP') and immediately qualifies the mechanism ('stream-based, no shell'), which separates it from a shell-based write through ssh_execute. An agent can tell what this does and how it differs from command execution without opening the schema.

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 an explicit selection condition: use this for large or multi-line files where shell heredoc/echo would break on escaping or size limits. The alternative is described behaviorally (shell heredoc/echo) rather than by tool name, so the routing to ssh_execute is implied rather than stated, and there is no explicit when-not guidance.

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