Skip to main content
Glama

CMO Studio: deploy and host AI-built apps

Write file

write_file

Save a small file you write yourself into a bucket (up to 5 MB): text (HTML, JSON, CSV, Markdown, SVG) or base64 for binary. An existing file at the same path is replaced. For files on the person's computer use get_file_upload_url; for a file on the web, import_file.

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": {
      "project": "<project>",
      "bucket": "<bucket>",
      "path": "<path>"
    },
    "name": "write_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath in the bucket, e.g. data/prices.json
textNoText content
base64NoBinary content as base64 (instead of text)
bucketYesBucket name
projectYesProject slug
contentTypeNoContent type (optional; guessed from the file name)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Beyond the supplied annotations (destructiveHint=false, title), it discloses the two facts an agent most needs before calling: the 5 MB size ceiling and that an existing file at the same path is replaced. The overwrite note is worth having, though it sits in some tension with destructiveHint=false, and the description says nothing about permissions or what a successful response looks like.

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?

Three short sentences, front-loaded with what the tool does and immediately followed by the routing decision. Every clause carries information: size limit, accepted formats, overwrite behavior, and two sibling hand-offs. No filler.

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 6-parameter write tool with no output schema, the definition covers the mechanics that matter — size cap, format handling, overwrite semantics, and alternative tools. Remaining gaps (project/bucket prerequisites, mutual exclusivity of text vs base64 stated as a rule rather than implied) are minor.

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%, so baseline is 3, but the description adds real meaning: it frames text and base64 as alternative ways to supply content, ties base64 to binary use, and notes contentType is optional and guessed from the file name. The 5 MB limit is a content constraint not expressed anywhere 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 states a specific verb and resource ('Save a small file ... into a bucket') with concrete scope: up to 5 MB, text formats enumerated (HTML, JSON, CSV, Markdown, SVG) or base64 for binary. It explicitly distinguishes itself from the two create/upload siblings, so an agent knows this is for content it authors itself rather than content originating elsewhere.

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 gives an explicit when-to-use rule plus the two alternatives and the condition selecting each: get_file_upload_url for files on the person's computer, import_file for a file on the web. The implicit third case — use this one when the agent generates the content — is made clear by elimination.

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.