Skip to main content
Glama

Append File

append_file

Append text to the end of a file, creating it if missing and leaving existing content unchanged. Adds exactly the given text, so include a newline when needed.

Instructions

Append text to the end of a file, creating the file if it does not exist. The existing content is never changed or replaced. The text is appended exactly as given, with no newline added before or after it, so end it with a newline if the next append should start on a new line. Only works within allowed directories.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "content": "<content>"
    },
    "name": "append_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesThe file to append to; it is created if it does not exist. Absolute, or relative to an allowed directory; it must resolve inside the allowed directories.
contentYesText to append, exactly as given. No newline is added: end it with \n if the next append should start on a new line.

Output Schema

NameRequiredDescriptionDefault
contentYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish a non-read-only, non-destructive, non-idempotent, sandboxed write. The description adds genuinely new behavior: the file is created when absent, existing bytes are never rewritten, and no newline is inserted. It does not say what happens if the parent directory is missing or the target is not writable, but the sandbox restriction is disclosed.

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?

Four short sentences, front-loaded with purpose and side effects, then the newline gotcha, then the access constraint. Nothing is redundant padding, and the most easily mishandled detail (exact append with no newline) is called out directly.

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 explained, and the two-parameter surface is simple. Coverage is strong; the only omissions are edge-case failure behavior such as missing parent directories or non-writable targets.

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 coverage is 100%, so both `path` and `content` are already fully documented, including the newline caveat and the allowed-directory resolution rule. The description restates those semantics for emphasis rather than adding meaning beyond the schema, so baseline 3 applies.

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 (append text to a file) plus the key side effect of creating the file when absent. The clause 'existing content is never changed or replaced' implicitly separates it from write_file, but no sibling is named, so the distinction is left for the agent to infer.

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?

Useful operating constraints are given (file created if missing, must resolve inside allowed directories), and the no-newline advice implies repeated appends. However, there is no explicit when-to-use-this-instead-of guidance against write_file, edit_file, or copy_file.

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