Skip to main content
Glama

ubuntu_write_file

Write text content to a policy-allowed file path using atomic writes, with automatic backups of existing files. Creates missing directories when permitted.

Instructions

Write text content to a policy-allowed file path.

Writes are performed safely with temporary-file + atomic move. Existing files are backed up as <path>.backup.<timestamp>.

Args: file_path: Destination file path. content: UTF-8 text payload to persist. create_dirs: If True, creates missing parent directories when directory path is also policy-allowed.

Returns: JSON string in unified {ok, data|error} contract. On success, data contains {"success": true, "path": ...}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
contentYes
file_pathYes
create_dirsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv1.1.0

TDQS

A4.6/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full behavioral disclosure burden. It goes beyond a minimal statement by revealing atomic-write semantics via 'temporary-file + atomic move,' backup behavior with timestamped filenames, and the unified {ok, data|error} return contract. It could add failure-mode details, but the disclosed behavior is substantive.

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?

The description is well-structured with a front-loaded purpose statement, compact Args and Returns sections, and no filler. Every sentence contributes behavioral, parameter, or return-value information that an agent needs.

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?

Given no annotations, no schema-level parameter descriptions, and the presence of sibling tools, this description is unusually complete. It covers what the tool writes, the safety mechanism, backup behavior, create_dirs policy nuance, and the response contract. No critical invocation detail is obviously missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate, and it does. It clarifies content as a UTF-8 text payload, file_path as the destination, and create_dirs with the important policy-allowed parent-directory condition. This adds real meaning beyond the bare schema titles.

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 statement: 'Write text content to a policy-allowed file path.' It clearly identifies the destination, content type, and safety constraint, and it is easily distinguishable from sibling tools like ubuntu_read_file and ubuntu_execute_command.

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?

The description gives clear context for when to use the tool: when persisting UTF-8 text to a policy-permitted path, and it clarifies the create_dirs behavior under policy restrictions. It does not explicitly compare against alternatives or state when not to use it, but the context is strong enough for an agent to route correctly.

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

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bill-kopp-ai-dev/percival-ubuntu-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server