Skip to main content
Glama

Write File

write_file

Write base64-encoded content to a file on a session's machine.

session_id is the id run_agent returns, or an env-manager session id.

Input Schema

NameRequiredDescriptionDefault
pathYes
session_idYes
content_base64Yes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Added

TDQS

B3.4/5.0
Behavior2/5

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

No annotations exist, so the description carries the full behavioral burden for a mutation tool. It never says whether an existing file is overwritten, whether parent directories are created, what permissions are required, or what happens on failure — the base64 requirement is the only behavioral fact disclosed, and that is already implied by the parameter name.

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, zero filler, with the core action and content format front-loaded before the parameter clarification. Every sentence adds information an agent can act on.

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?

An output schema exists, so return values need not be described, and the description covers the essentials for a three-parameter call. The gap is on the mutation side: overwrite semantics, size limits, and path resolution are absent, which matters for a write tool with no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/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 for all three parameters. It usefully explains session_id's provenance (run_agent return value or env-manager session id) and confirms content_base64's encoding, but `path` — the parameter most likely to cause an error (absolute vs relative, directory creation) — gets no explanation at all.

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?

States a specific verb (write), resource (a file), target (a session's machine), and content format (base64-encoded), which cleanly separates it from read_file and list_files. It stops short of naming a sibling explicitly, so it lands just below the top band.

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 only implied: the tool is obviously for placing file content on a remote session, and the note that session_id comes from run_agent is a helpful prerequisite. There is no statement of when to prefer this over alternatives, no guidance on overwrite behavior, and no note about which session types are valid.

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.