Skip to main content
Glama

escribir_archivo

Destructive

Creates or replaces text files on remote servers, backing up existing files to a timestamped .bak file before writing when backup is enabled.

Instructions

Crea o reemplaza un archivo de texto en el servidor.

Si el archivo existe y respaldo=True, primero lo copia a .bak.. No usa sudo: solo funciona en rutas donde el usuario SSH puede escribir.

Input Schema

NameRequiredDescriptionDefault
rutaYes
respaldoNo
servidorYes
contenidoYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false and openWorldHint=true, so the safety profile is known. The description adds real context beyond that: existing files are replaced, a backup named '<ruta>.bak.<fecha>' is made when respaldo=True, and writes require SSH-user permissions because sudo is not used. It does not explicitly warn that respaldo=False makes the overwrite irreversible.

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?

Three short lines, front-loaded with the core action, followed by the backup condition and the permission constraint. No filler sentences; each line adds operational information.

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 destructive file-write tool with annotations and an output schema present, the description covers the key operational facts: overwrite semantics, backup behavior, and permission requirements. The main gaps are the meaning/format of 'servidor' and any encoding or size notes for 'contenido'.

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 0%, so the description must carry parameter meaning. It does well for 'respaldo' (default true, backup naming convention) and implies 'ruta' is the target path, but 'servidor' and 'contenido' are left unexplained in both schema and description.

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?

The description states a specific verb and resource: 'Crea o reemplaza un archivo de texto en el servidor.' That clearly distinguishes it from the read-oriented siblings like leer_archivo and listar_servidores. It stops short of naming a sibling or clarifying boundaries against ejecutar_comando, which could also write files.

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

Usage Guidelines3/5

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

The conditional 'Si el archivo existe y respaldo=True' gives a concrete behavioral rule for the backup path, and the sudo note implies a permission prerequisite. But there is no explicit when-to-use vs. alternatives guidance, such as when to prefer ejecutar_comando or leer_archivo first.

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