Skip to main content
Glama

Write an agent's file

write_agent_file
Destructive

Writes a file that shapes an agent's job: SOUL.md, objectives.md, now.md, or a file under watch/, notes/ or immune/ in its ~/.hermes. The previous version stays in its history.

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": {
      "agent_id": "<agent_id>",
      "path": "<path>",
      "content": "<content>"
    },
    "name": "write_agent_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYes
contentYes
agent_idYesThe agent id, like agt_j8bbg89jv5 (get_account lists them).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, so the safety profile is known; the description adds real value by disclosing that the previous version is retained in the file's history, which materially changes how an agent should reason about the destructive flag. It also constrains the writable surface (only specific files/directories), which annotations cannot convey. It stops short of saying what happens to a path outside that set or whether it creates new files.

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?

Two short sentences with zero filler, and the allowed-path enumeration is front-loaded where a caller needs it. Every clause carries information that is not already in structured fields.

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?

For a three-parameter destructive write with no output schema, the description covers the essentials: what it writes, where, and that prior versions survive in history. Remaining gaps are modest – behavior on disallowed paths, whether new files can be created, and any size/permission constraints on content.

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 only 33% – agent_id is documented in the schema, but path and content are bare. The description compensates for the most ambiguous one by naming the permissible path values (SOUL.md, objectives.md, now.md, watch/, notes/, immune/) and the ~/.hermes base, which is information an agent could not derive from the schema. The content parameter and its large maxLength are still unexplained.

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 ('Writes a file') plus the exact resource class (an agent's job-defining files in its ~/.hermes) and enumerates the allowed targets: SOUL.md, objectives.md, now.md, and files under watch/, notes/ or immune/. This is enough to distinguish it from the read-only sibling read_agent_files without opening either schema.

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?

The scope of writable paths implies when the tool applies (job-shaping files inside an agent's home), and the existence of read_agent_files makes the read-vs-write split inferable, but nothing is stated explicitly. There is no when-not-to-use guidance, no mention of prerequisites such as the agent existing, and no named alternative for cases outside the allowed path set.

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