Skip to main content
Glama

files_write

Destructive

File management operations that create or modify state: create a new file, open an existing file to start an editing session, or close a session. Requires authentication.

Actions: • open_file(file_id?, file_name?) — Open a spreadsheet, document or presentation by UUID or name and start an editing session. Returns the file's kind and web URL. Use read_data / write_data on a spreadsheet, doc_read / doc_write on a document and slide_read / slide_write on a presentation. The open is remembered for your user across MCP sessions (last open wins) — clients that use a new session per request do not need to re-open after auth(confirm_login). • create_file(file_name, team_uuid?, kind?) — Create a new blank spreadsheet (kind "GRID", the default), document (kind "DOC") or presentation (kind "SLIDE"). If team_uuid is omitted, the user's first team is used. Returns the new file's UUID and web URL; the file must be opened with open_file before it can be edited. • close_file(file_id) — Close an active editing session.

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": {
      "action": "<action>"
    },
    "name": "files_write"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionYesAction to perform: open_file, create_file, or close_file
paramsNoParameters for the action (see tool description)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / title
      Removed value: -"FilesWriteAction"
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=true, idempotentHint=false), the description adds real behavioral context: authentication is required, opens are remembered per-user across MCP sessions with last-open-wins semantics, and team_uuid falls back to the user's first team. It does not disclose which of the three actions is destructive (close_file not destroying data vs create_file mutating the workspace), nor error behavior when a name is ambiguous, so a 4 rather than a 5.

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 structure is excellent — a one-line scope statement followed by three bulleted actions with parameters and return values front-loaded. It is on the longer side and some clauses (the session-persistence note) are dense, but each sentence conveys operational information rather than restating the tool name.

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-action tool with no output schema and an opaque params object, the description covers the essentials: what each action does, required vs optional arguments, default kind and team, and what is returned (UUID, web URL, file kind). The main gap is lifecycle detail for close_file — whether unsaved edits are lost or what state a session is left in — which matters given the destructiveHint annotation.

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?

The formal schema's params property is an opaque untyped object, so the description carries nearly all parameter meaning: it names each action's arguments, marks optionality with '?', and gives the enumerable values for kind ('GRID' default, 'DOC', 'SLIDE'). It stops short of resolving ambiguities such as passing both file_id and file_name, or which parameter wins in that case.

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 opening sentence states a precise scope — state-changing file management — and enumerates the three concrete operations (create, open, close). Each action bullet has a specific verb plus resource ('create a new blank spreadsheet', 'Open a spreadsheet, document or presentation'), making the tool trivially distinguishable from files_read.

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?

The description routes the agent explicitly: after open_file, use read_data/write_data for spreadsheets, doc_read/doc_write for documents, slide_read/slide_write for presentations, and it notes files must be opened before editing. It also explains the cross-session persistence so clients know whether to re-open after auth(confirm_login), which is exactly the kind of when-to-do-what guidance an agent needs.

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.