Skip to main content
Glama

encrypt-file

Destructive

Encrypts one plain file in its repository location using an age public key, requiring confirmation and a reason for this emergency operation.

Instructions

dbabrain common.cli encrypt-file: ONE file encrypted with age where it lies on the repository, for a key's public half only (0.37.0). Changes or removes something. A command on the emergency-operations list takes confirm: "yes" and a reason in its request, as on the command line. Request fields (pass them as request):

  • host (required): Where the file is: {runtime (linux | docker | k8s), host, port, username, password | key_file, sudo}.

  • path (required): The one plain file, in full.

  • file_name (required): The last part of path - stated, and held to it.

  • size_bytes (required): The plain file's bytes, as the catalog proved them.

  • sha256 (required): The plain file's sha256, as the catalog proved it.

  • must_be_under (required): The repository folder path must be strictly under.

  • recipients (required): The key's public half (age1...).

  • key_id (required): The key's number in the runtime store.

  • key_expires_at (required): When the key stops encrypting (UTC) - refused at and after it.

  • timeout_seconds: Seconds the host may take; default 3600.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "encrypt-file"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestNo

Output Schema

NameRequiredDescriptionDefault
resultYes

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?

The annotations already declare destructiveHint=true, but the description adds real operational context the annotations cannot: a mandatory `confirm: "yes"` and `reason`, refusal at or after `key_expires_at`, the repository containment constraint, and a 3600s default timeout. The main gap is that 'Changes or removes something' never states whether the plaintext file is replaced or deleted after encryption, which matters for a destructive in-place operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

Front-loaded with the core action and then a clean bulleted field list, which is easy to scan. But generic template padding ('Changes or removes something') and the stray version tag '(0.37.0)' consume space without informing invocation, and phrasing like 'as the catalog proved them' is idiosyncratic.

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?

All required inputs are documented, destructive semantics plus the confirmation protocol are disclosed, and an output schema exists so return values need no explanation. What remains missing is the post-encryption state of the plaintext file and how failures or partial writes are handled.

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 description coverage is 0% and the schema exposes only an opaque nullable `request` object, so the description carries the full burden — and it does, enumerating all required request fields with meaning, including the nested host shape and the plaintext-metadata fields (size_bytes, sha256). It does not give format examples beyond 'age1...' or explain how key_id resolves in the runtime store, leaving some residual ambiguity.

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 names a concrete verb+resource and scope: one plain file encrypted with age in place ('where it lies'), using only a key's public half. That is materially more specific than the tool name alone. It never explicitly contrasts with the sibling 'encrypt-secret', so the file-vs-secret distinction has to be inferred.

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?

Usage is implied through hard preconditions: the path must be strictly under `must_be_under`, the key must not be expired, and the operation appears on the emergency-operations list requiring confirm plus reason. There is no explicit 'use this when…, use X instead' routing to alternatives such as encrypt-secret.

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

Deploy Server

Other Tools