Skip to main content
Glama

Write a file to a device

pi_file_write
Destructive

Create or overwrite one file on a remote SSH device relative to $HOME, creating missing parent directories and accepting UTF-8 or base64 content up to 16 MB.

Instructions

Create or overwrite one file on the remote device relative to $HOME, creating missing parent directories. content may be UTF-8 text or base64 and is limited to 16 MB.

Input Schema

NameRequiredDescriptionDefault
pathYesPath relative to the authenticated user's remote $HOME directory.
contentYesFile content (UTF-8 or base64).
encodingNoutf8
device_idYesIP address, hostname, MAC address, or device identifier of the target Raspberry Pi / SSH device.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuinely useful context beyond that: the tool overwrites existing files, auto-creates missing parent directories, and enforces a 16 MB content limit. It does not discuss permissions, failure modes, or whether the write is atomic, which keeps it below 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.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two dense sentences with zero filler, and the most decision-relevant facts (overwrite behavior, $HOME-relative path) are front-loaded. Every clause carries information an agent would otherwise lack.

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 four-parameter mutation tool with no output schema, this covers the essentials: overwrite semantics, directory auto-creation, path relativity, and payload size. Minor gaps remain around encoding-parameter behavior and what happens on partial failure or permission denial.

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 75%, and the description still adds meaning: it clarifies that content can be UTF-8 text or base64 and that the size ceiling is 16 MB, a constraint absent from the schema. It does not explain that the 'encoding' parameter selects how 'content' is interpreted, leaving the interaction between those two fields underspecified.

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 ('Create or overwrite one file on the remote device') with an explicit scope constraint ('relative to $HOME'). It implicitly separates itself from pi_file_read and pi_directory_create by being single-file creation, but it never names or contrasts with those siblings, so the differentiation is inferential rather than explicit.

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 or when-not-to-use guidance and no mention of alternatives such as pi_directory_create or pi_file_read. The agent must infer that this is the tool for writing a single file and that it should not be used for bulk operations or directory creation.

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