Skip to main content
Glama

get_file

Download a single remote file to the MCP host with temporary-file staging, size and SHA-256 verification, and atomic overwrite of local_path on success.

Instructions

从目标层下载单个文件到 MCP 服务所在机器(支持二进制)。先传输至本地暂存文件并校验大小与 SHA-256 后再落位,校验失败不破坏已有本地文件;成功时会覆盖已存在的 local_path,返回传输通道、字节大小、校验等级 (verification) 与写入形态 (write_mode)。仅读取远端小文本请用 read_file,批量传输多个文件请使用 run_batch。

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": {
      "local_path": "<local_path>",
      "remote_path": "<remote_path>"
    },
    "name": "get_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
layerNo目标层名(缺省=默认层)
transportNo缺省 exec。SFTP 适用于可直达的 SSH 文件系统
local_pathYesMCP 服务进程所在机器的文件路径
timeout_msNo每次 SSH 命令或 SFTP 进程的超时毫秒数,缺省 120000
remote_pathYes目标层内的文件路径

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/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 well: it discloses the staging-then-verify flow (size + SHA-256), that a failed verification leaves existing local files intact, that a success overwrites an existing local_path, and what the response reports (transport channel, byte size, verification level, write_mode). It does not cover permission/auth requirements or what happens when the remote file is missing, which keeps it short of a 5.

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?

It is dense but front-loaded: the core action comes first, then safety/behavioral details, then the sibling routing sentence last. Each clause carries information (staging, verification, overwrite, return fields, alternatives), though the single packed paragraph could be split for easier scanning.

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 5-parameter transfer tool with no output schema and no annotations, the description supplies the safety model, the overwrite contract, the return-shape summary, and sibling routing. Nothing essential to calling it correctly appears to be missing.

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 coverage is already 100%, so the baseline would be 3; the description adds real meaning beyond the schema by stating that local_path is overwritten on success and that failures are non-destructive, which is decision-relevant for the caller choosing that path. It adds little for layer/transport/timeout_ms, which the schema already documents.

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 opens with a specific verb+resource: downloading a single file from a target layer to the MCP host, and explicitly notes binary support and the one-file scope. An agent can distinguish it from read_file (small text reads) and run_batch (multi-file transfer) without consulting any 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?

It names two alternatives and the conditions that select them: read_file for small remote text reads, run_batch for transferring multiple files. The implied when-to-use case (single-file download, including binaries) is stated by contrast, leaving no routing ambiguity.

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