Skip to main content
Glama

File Write Text

file_write_text

Write text content directly to a NAS file, automatically creating missing parent directories. Suitable for small text files such as configurations, scripts, or compose files.

Instructions

把文本内容直接写入 NAS 文件(写操作;组合 upload 实现)。

等价于在服务器临时文件上执行 file upload:远端父目录不存在时会 先用 file_mkdir 逐级创建。overwrite=skip 时远端同名文件已存在则 跳过不写。适合写配置、脚本、compose 文件等小文本。

Input Schema

NameRequiredDescriptionDefault
hostNoNAS 主机地址(IP 或域名)
pathYesNAS 目标文件路径,如 /vol1/1000/文档/note.md
portNoNAS 端口,如 5667(HTTPS)/5666(HTTP)/443
schemeNo传输协议
contentYes写入的文本内容
profileNo独立 session profile 名称,默认使用 default
overwriteNoreplace

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.2

TDQS

A4.1/5.0
Behavior3/5

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

With no annotations the description carries the full burden, and it does disclose real behavior: parent directories are auto-created via file_mkdir and overwrite=skip leaves existing files untouched. However, it does not explain the default overwrite=replace (a silent destructive overwrite) or what 'rename' does, nor any auth/permission requirements, which matters for a mutation tool.

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?

Dense and front-loaded: the mutation nature and upload-equivalence come first, then the mkdir and overwrite caveats. Every sentence carries information, though the phrasing is slightly compressed for non-Chinese readers.

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?

An output schema exists, so return values need not be described, and the description covers the mutation nature, directory auto-creation, and skip behavior. Remaining gaps (replace/rename semantics, permission needs) are moderate rather than critical for correct invocation.

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, but the description adds meaning the schema lacks: the overwrite enum has no per-value description, and the text explains the skip case and the implicit parent-path creation tied to path. It still leaves replace/rename semantics unexplained, so it is above baseline but not complete.

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 and resource (把文本内容直接写入 NAS 文件), marks it as a write operation, and distinguishes it from the binary path by noting it is '组合 upload 实现' and aimed at small text files. An agent can tell this apart from file_upload / file_mkdir from the description alone.

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?

Gives a clear context ('适合写配置、脚本、compose 文件等小文本') and hints at the sibling relationship with file_upload, plus the overwrite=skip condition. It stops short of explicitly stating when NOT to use it (e.g. large/binary content → file_upload), so it is clear but not fully routed.

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