Skip to main content
Glama

File Check Upload

file_check_upload

Check whether an upload target exists and has enough quota on an fnOS NAS before uploading. Returns skip/conflict status to avoid accidental overwrites.

Instructions

预检上传目标(探测远端占用与配额)。

overwrite 默认 skip,这是非破坏性的:目标已存在时返回 {"result":"succ","skip":1} 表示会跳过,原文件不动。

警告(真机实测):

  • overwrite=replace 时上游 check-upload 会立刻把同名目标文件截断成 0 字节,内容丢失且回收站里也没有。别用它"试探会不会冲突",要覆盖 直接调 file_upload。

  • 目标不存在时上游会留下 0 字节的 <名字>.#0 占位文件。不要用 file_delete 删它:fnOS 的 rm 把 X.#0 当作 X 的别名,会连同名目标 文件一起删掉。占位文件会被后续 file_upload 覆盖,留着无害。

Input Schema

NameRequiredDescriptionDefault
hostNoNAS 主机地址(IP 或域名)
pathYesNAS 上的路径,如 /vol1/1000/文档
portNoNAS 端口,如 5667(HTTPS)/5666(HTTP)/443
sizeYes文件大小(字节)
schemeNo传输协议
profileNo独立 session profile 名称,默认使用 default
overwriteNoskip

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so richly: it discloses the non-destructive skip default and its return shape, the silent truncation-to-0-bytes of overwrite=replace (including that recycle bin has no copy), and the 0-byte placeholder file plus the dangerous alias behavior of file_delete on it.

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?

Purpose is front-loaded, then structured warnings. It is longer than typical but every sentence (the two warnings and the placeholder/delete hazard) earns its place with non-obvious operational detail, so length is justified.

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?

An output schema exists so return values need not be explained, yet the description still documents the key skip return shape. For a mutation-adjacent check tool with no annotations, it covers the critical edge cases an agent needs to call it safely.

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 86%, so the baseline is 3. The description adds substantial meaning for the overwrite parameter (default skip semantics and the destructive consequence of replace) beyond the enum the schema provides, though other params (path/host/port/size) are left to 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?

States a specific verb+resource: pre-checking an upload target and probing remote occupancy and quota. This clearly distinguishes it from file_upload and other file tools in the sibling list.

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?

Explicitly states overwrite defaults to skip and is non-destructive, warns not to use overwrite=replace to probe for conflicts, and routes the agent to file_upload for actual overwriting. When-to-use and when-not-to-use are both covered.

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

Deploy Server

Other Tools