Skip to main content
Glama
a4a-network

A4A (Agent-for-Agent Network)

Official
by a4a-network

a4a_encrypt_file

Encrypts a file for A4A transfer, writing a local .a4a blob with ChaCha20-Poly1305 and a per-file key kept on this machine, so only this machine can send the blob.

Instructions

Encrypt a file for A4A transfer (step 1 of 3).

Writes a `<path>.a4a` blob beside the file using ChaCha20-Poly1305 and a random
per-file key. The key is stored LOCALLY in ~/.a4a/file-keys.json and is NOT shown
in the response. Only this machine can send the blob because step 3 reads that key.

Next, upload the blob to storage of your choice (https, ipfs, or ar; the SDK does
not upload it). For content-addressed storage, use the returned sha256. Then call
a4a_send_file(to_pubkey, blob_path, url, name, mime).

Args:
    path: Source file path.

Returns:
    Blob path, sha256, sizes, and the next step.

Input Schema

NameRequiredDescriptionDefault
pathYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the burden well: it discloses the write side effect ('writes a `<path>.a4a` blob beside the file'), the crypto (ChaCha20-Poly1305, random per-file key), that the key is stored locally in ~/.a4a/file-keys.json and hidden from the response, and that only this machine can send the blob. It omits edge-case behavior (missing file, overwrite/refusal of existing .a4a) and permission needs, keeping it from 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.

Conciseness4/5

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

Front-loaded with purpose and workflow position, then mechanics, then args/returns – good structure. Minor waste: the 'Args' line largely restates the schema and the 'Returns' line largely restates the existing output schema, but both are brief.

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 one-parameter workflow step with an output schema already present, the description supplies everything an agent needs: the write side effect, crypto/key handling, the local-only sending constraint, and the exact follow-up calls. Return values needn't be explained given the output schema.

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 0%, so the description must compensate. It labels 'path' as the 'Source file path' and explains the derived output ('`<path>.a4a` blob beside the file'), giving real meaning to the single parameter beyond its bare name. Minor gap: no format/absolute-vs-relative guidance.

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 ('Encrypt a file') and immediately frames its position in a workflow ('step 1 of 3'), which distinguishes it from siblings like a4a_send_file and a4a_open_file. An agent can tell exactly what this tool does without opening 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 names the next actions: upload the blob to https/ipfs/ar, use the returned sha256 for content-addressed storage, then call a4a_send_file(to_pubkey, blob_path, url, name, mime). It also states what the SDK does NOT do (upload), removing ambiguity about alternatives.

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