Skip to main content
Glama

Write a Google Drive file

connections_storage_write_google_drive_file
Destructive

Write text into the connected Google Drive. Without file_id it creates a file named name in parent_id or My Drive, as plain text, markdown or a Google Doc (format google_doc). With file_id it REPLACES all of that text or markdown file, so read it first with read_google_drive_file and send the full new text; a Google Doc cannot be replaced, and a file someone shared with the member is refused. Up to 1,000,000 characters. Returns the file's id and name.

Input Schema

NameRequiredDescriptionDefault
nameNoThe new file's name. Required unless file_id is given.
formatNoDefault text. google_doc creates a Google Doc.
personNoLinked person to run this call as (first name). Omit to run as the connection's holder.
contentYesThe full text to write.
dry_runNoPreview only.
file_idNoOptional. The Drive id of an existing text or markdown file whose content is replaced.
projectNoWorkspace to run this call in (id or name).
parent_idNoOptional. The Drive id of the folder to create the file in.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / dry_run / description
      Previous value: -"Preview only; nothing is written."New value: +"Preview only."
  2. Changed2 schema fields changed
    • changedInput schema / properties / dry_run / description
      Previous value: -"Preview only: return what this call would do, with nothing written."New value: +"Preview only; nothing is written."
    • addedInput schema / properties / person
      Added value: +{
      +  "description": "Linked person to run this call as (first name). Omit to run as the connection's holder.",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • addedInput schema / properties / project
      Added value: +{
      +  "description": "Workspace to run this call in (id or name).",
      +  "type": "string"
      +}
  4. Added

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, so the description's job is to say what is destroyed and under what conditions. It does that precisely ('REPLACES all of that text'), plus adds the 1M character cap, the shared-file refusal, the read-first prerequisite, and the return value. Minor deduction because it doesn't distinguish content vs. name/metadata preservation on replace beyond 'all of that text'.

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?

Six short clauses, each carrying distinct information: mode, creation defaults, replacement warning with the read-first instruction, two refusal conditions, size limit, and return shape. Front-loaded with the create/replace distinction that determines everything else.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 8-parameter destructive write tool with no output schema, the description covers the behavioral contract (what gets overwritten, limits, refusal cases) and states the return value. Nothing an agent needs to invoke it correctly is missing.

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 conditional semantics the schema leaves implicit: file_id switches the entire operation mode, name applies only on create, and parent_id falls back to My Drive. Those defaults and mode interactions are meaningfully beyond the field-level descriptions.

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?

States a specific verb and resource ('Write text into the connected Google Drive') and immediately splits the two operating modes: create without file_id, replace with file_id. An agent can distinguish it from siblings like read_google_drive_file or save_file without inspecting either schema.

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?

Explicit routing: use file_id only for replacing an existing text/markdown file, and read it first with read_google_drive_file. It also names hard exclusions — Google Docs cannot be replaced and files shared with the member are refused — so the agent knows when this tool will fail.

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.

Resources