Skip to main content
Glama

AANet

aanet_write_file

Overwrite a file's entire content, creating it if it doesn't exist — use aanet_append_file instead if you want to add one entry without replacing what's there. Fires a file_write webhook event on success (see aanet_register_webhook).

Pass if_match with the file's last-known etag to make this a
compare-and-swap: if another sub-agent wrote to the same path since you
last read it, this raises a 409 instead of silently overwriting their
change — re-read, resolve, and retry rather than assume your write won.
Returns {path, created, etag}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYesVirtual file path within the workspace.
api_keyYesBearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403.
contentYesFull new content of the file — this replaces it entirely.
if_matchNoThe file's current etag (from aanet_read_file or a prior write's response), to detect a concurrent write from another sub-agent. Omit to overwrite unconditionally.
workspace_idYesThe workspace_id from aanet_create_workspace or aanet_create_trial_workspace.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / api_key / description
      Added value: +"Bearer credential for this workspace: either the owner_key returned once by aanet_create_workspace/aanet_create_trial_workspace, or a sub-key returned by aanet_mint_subkey. Sent under the hood as `Authorization: Bearer <api_key>`. Owner-only tools reject a sub-key with a 403."
    • addedInput schema / properties / content / description
      Added value: +"Full new content of the file — this replaces it entirely."
    • addedInput schema / properties / if_match / description
      Added value: +"The file's current etag (from aanet_read_file or a prior write's response), to detect a concurrent write from another sub-agent. Omit to overwrite unconditionally."
    • addedInput schema / properties / path / description
      Added value: +"Virtual file path within the workspace."
    • addedInput schema / properties / workspace_id / description
      Added value: +"The workspace_id from aanet_create_workspace or aanet_create_trial_workspace."
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral burden, and it delivers: full overwrite semantics, create-if-missing behavior, webhook side effect, 409-on-conflict behavior, and the exact return shape. Nothing important is hidden.

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?

The description is tightly structured: core behavior first, alternative routing second, side effect third, and concurrency semantics last. Every sentence earns its place without redundancy.

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 mutation tool with no output schema and no annotations, the description is fully self-sufficient: it covers behavior, side effects, error handling, return shape, and the relevant sibling alternative. No essential calling information 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 100%, but the description adds meaningful behavioral context beyond the schema: it explains the compare-and-swap intent, the 409 consequence, and the 're-read, resolve, and retry' strategy for if_match. This goes beyond the basic etag description in the schema.

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?

The description opens with a specific verb and resource: 'Overwrite a file's entire content, creating it if it doesn't exist.' It also distinguishes itself from the sibling aanet_append_file, making its purpose unmistakable.

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?

It explicitly states when to use an alternative ('use aanet_append_file instead if you want to add one entry without replacing what's there') and provides clear operational guidance for the compare-and-swap flow: pass if_match, handle 409 by re-reading, resolving, and retrying.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources