Skip to main content
Glama

Write File

file_write

Create or update a file. Pass mode: "create" | "update". Binary uploads: call with binary: true to get an upload_url, then PUT bytes, then call with mode: "finalize".

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": {
      "mode": "<mode>"
    },
    "name": "file_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeYes"create" for new files, "update" to edit existing, "finalize" to complete a binary upload.
nameNoFile name (required for create, max 200 chars).
tagsNoTags for organization (max 10).
contentNoText content (for .md files).
contextNo"personal" (default) or "team:<id>".
file_idNoFile ID to update (required for update/finalize).
sectionNoWhich section to file under (required for create).
asset_idNoExisting asset ID to retrieve URL without re-uploading.
filenameNoOptional filename for the asset.
file_dataNoBase64-encoded binary data (for images, video).
image_urlNoPublic URL to download and host permanently.
image_dataNoBase64-encoded image. Alternative to image_url when the bytes are already local.
descriptionNoOptional summary (max 500 chars).
plan_statusNoPlan status (only for plans section).
prompt_metaNoPrompt metadata (only for prompts section).
content_typeNoMIME type. Defaults to "text/markdown" for content, "image/png" for file_data.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare this as a non-read-only, non-destructive, non-idempotent write operation, so the safety bar is lower. The description adds a useful multi-step binary upload workflow, but it references a "binary: true" parameter that does not exist in the input schema, reducing reliability.

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?

The description is short, front-loads the main purpose, and then covers mode usage. It is appropriately sized, though the mention of an undefined binary parameter weakens the structure.

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?

For a 16-parameter tool with nested objects and multiple upload paths, the description only covers text create/update and binary upload, omitting asset retrieval and image URL/data alternatives. The rich input schema compensates, but the description is still incomplete enough to require schema reading.

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 description coverage is 100%, so the schema already carries the parameter documentation burden. The description mostly repeats the mode enum and adds a binary workflow involving a parameter absent from the schema, so it does not add meaningful semantic value beyond structured fields.

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?

The description states a clear verb and resource: "Create or update a file." It implies creation/update rather than read/delete/list, but does not explicitly name sibling tools or otherwise differentiate itself from them.

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?

It explains the create/update modes and a binary finalize workflow, but gives no explicit when-to-use guidance versus alternatives or when not to use this tool. Usage is implied by the create/update framing.

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.