Skip to main content
Glama

archive_file

Move a file into archive/ while preserving its relative path to retire old or superseded notes recoverably instead of deleting them.

Instructions

Move a file into the top-level archive/ folder, preserving its relative path (notes/foo.md becomes archive/notes/foo.md). Archiving is recoverable and is the default way to retire old or superseded files instead of deleting them. Use restore_file to move an archived file back. Files in archive/ are excluded from search_files, while list_directory still shows archive/ so archived files remain inspectable. Refuses to overwrite if the destination under archive/ already exists, and rejects directories, missing files, archive/ itself, or files already inside archive/. Paths are relative to the library root (MEMDRIVE_ROOT). Absolute paths are accepted only when they stay inside the root. The root is a hard sandbox: "../" escapes and symlinks pointing outside are rejected.

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>"
    },
    "name": "archive_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesFile to archive, relative to the library root (for example "notes/2026-10-28.md").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.9.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and meets it: it discloses recoverability, refusal to overwrite an existing destination, the exact set of rejected inputs (directories, missing files, archive/ itself, already-archived files), and the sandbox rules for absolute paths, '../' escapes, and external symlinks. These are non-obvious constraints an agent could not infer from the schema.

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?

Front-loaded with the core action, then progressively adds undo path, search/list interaction, and failure modes. It is longer than most one-param tools need, but nearly every clause encodes a distinct constraint rather than filler.

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?

For a single-path mutation tool with no output schema and no annotations, the description covers the path contract, error conditions, recoverability, and interaction with sibling tools. Nothing an agent needs to invoke it safely is missing.

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 already 100%, so the baseline is 3; the description adds meaning by defining what 'relative to root' means, when absolute paths are tolerated, and the hard sandbox boundary. It does not restate the format details already in the schema, which is appropriate.

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 (move a file into archive/) and immediately defines the path-mapping rule with a concrete example ('notes/foo.md' becomes 'archive/notes/foo.md'). This distinguishes it from a delete or a generic move without needing to open the schema.

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

Usage Guidelines5/5

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

Explicitly frames archiving as the default alternative to deleting for retiring files, names restore_file as the inverse operation, and warns that archived files drop out of search_files while remaining visible to list_directory. That is when-to-use, what-it-replaces, and how-to-undo in one place.

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