Skip to main content
Glama

Write File

write_file

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

session_id is the browser session id issued by env-manager when the session was created, not the id run_agent returns.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathYes
session_idYes
content_base64Yes

Output Schema

TableJSON 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

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full behavioral burden. It does disclose that content must be base64-encoded and that writing happens on a remote browser session's machine, but it is silent on whether an existing file is overwritten, what permissions or failures are possible, and whether parent directories are created.

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 sentences, front-loaded with the action and scope, followed by the single most likely point of confusion (which session id). No filler or repetition of the tool name.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 session_id caveat is valuable. But for a mutation tool with zero annotation coverage and 0% schema description coverage, the description omits overwrite semantics and path interpretation, leaving meaningful gaps.

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, and it does explain session_id's provenance in detail — a genuinely non-obvious point. However, 'path' is left entirely unexplained (absolute vs relative, whether directories are auto-created), and content_base64's encoding is only implied by the opening clause.

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 states a specific verb and resource with scope: 'Write base64-encoded content to a file on a browser session's machine.' It goes further by disambiguating the session_id from the id returned by run_agent, so an agent can distinguish the two identifiers 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The second sentence implies correct usage by specifying which session id to pass, which is real guidance, but it never states when to use this tool versus siblings like read_file or list_files, nor any preconditions (e.g., session must exist, file may be overwritten).

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.