Skip to main content
Glama

put_file

Uploads a file from the MCP server host to a target layer, checks integrity before placement, and returns verification and write-mode details.

Instructions

从 MCP 服务所在机器上传一个文件到目标层。支持二进制,校验后落位,可能覆盖目标文件。返回校验等级和写入形态。

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": "put_file"
  }
}

Input Schema

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.6/5.0
Behavior4/5

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

No annotations are supplied, so the description bears the full burden, and it does meaningful work: it discloses that binary content is supported, that the file is verified before being placed, and critically that the target file may be overwritten. It also pre-announces the return content (verification level and write form), though it omits permission/auth requirements, whether the write is atomic, and what happens if verification fails partway.

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?

One tight sentence-cluster that front-loads the core action (source machine → target layer) and then layers on the risk (may overwrite) and the return contract. Every clause carries distinct information with no repetition of the name or title.

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

Completeness4/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, this is close to sufficient: overwrite risk is flagged and the return values are described in the description, compensating for the absent output schema. The remaining gaps are around failure behavior and preconditions (permissions, missing remote directories) rather than around how to call it.

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 including the two enums is already documented in the schema; the description adds no syntax, format, or defaulting guidance beyond that. Baseline 3 applies since the schema carries the parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('upload a file from the MCP service's machine to the target layer'), with an explicit directionality that implicitly separates it from pull-style siblings like get_file and read_file. It stops short of naming any sibling, so an agent must infer the push-vs-pull distinction itself rather than being told outright.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance: nothing tells the agent when to choose this over edit_file, push_into, push_ssh, or run_command with a copy, and no exclusion or prerequisite is stated. The only routing guidance in the whole definition ('SFTP for directly reachable SSH filesystems') lives in the schema's transport parameter, not the description.

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