Skip to main content
Glama

update_file_content

Replace an entire Google Doc or Sheet with new Markdown, HTML, plain text, or CSV content while preserving the file's ID, name, sharing, and location.

Instructions

WRITES. Replace a file's content with new text. For a Google Doc the text is re-imported (Markdown, HTML or plain text), replacing the whole document; for a Sheet pass CSV. The file id, name, sharing and location are unchanged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fileIdYes
contentYes
mimeTypeNoMIME type of `content`. Default text/markdown for a Doc, text/csv for a Sheet, otherwise the file's own type.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does meaningful work: it flags a destructive whole-document overwrite and names what is preserved (file id, name, sharing, location). It omits permissions/auth requirements, reversibility, and response behavior, so it is strong but not complete.

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 tight sentences with the mutation warning front-loaded; every clause conveys distinct information about behavior or format. 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 content-mutating tool with no annotations, no output schema, and thin schema descriptions, the definition covers the destructive semantics, format expectations, and preservation guarantees well. Remaining gaps are auth requirements and return/error behavior.

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 only 33%, so the description must compensate, and it does: it defines what `content` should be per target type (Markdown/HTML/plain text for Docs, CSV for Sheets) and implicitly explains `mimeType` defaults. `fileId` is still left unexplained.

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 ("Replace a file's content") and resource, and the leading "WRITES." makes the mutation unmistakable. It is distinguishable from sibling update_file_metadata because it scopes itself to content, not properties.

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 Doc-vs-Sheet format guidance (Markdown/HTML/plain text vs CSV) implicitly tells the caller which content to pass, but there is no explicit when-to-use statement and no named alternatives (e.g., update_file_metadata, upload_file). Usage is implied rather than stated.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.