Skip to main content
Glama

Format Doc from Markdown

format_document
Destructive

Write markdown content into a Google Doc with full formatting — headings, bold, italic, bullets, numbered lists, links, and horizontal rules. Use this instead of create_document or update_document when the content has structure that should be visually formatted. Pass file_id to replace an existing doc's content, or omit to create a new doc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNoDocument title (required when creating a new doc)
accountNoWhich connected Google account to create in, by its address, when the user has more than one — see get_status connections. Omit for the primary account.
file_idNoExisting Google Doc file ID to replace content in. Omit to create a new doc.
markdownYesMarkdown content to render as a formatted Google Doc. Supports headings (# ## ###), **bold**, *italic*, - bullet lists, 1. numbered lists, [links](url), and horizontal rules (---).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesLink that opens the document in Google Docs — give this to the user
modeYesThe write mode actually applied: 'replace' or 'append'. Compare this against what you asked for.
statusYes'ok' when the write landed; 'not_shared' when Google would not acknowledge the document — nothing was written, and the result text says how to recover
document_idYesThe document that was written
chars_writtenYesNumber of characters written, counted in runes rather than bytes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / status / description
      Previous value: -"Always 'ok' — a failure arrives as an error, not as a status"New value: +"'ok' when the write landed; 'not_shared' when Google would not acknowledge the document — nothing was written, and the result text says how to recover"
  2. Changed1 schema field changed
    • addedInput schema / properties / account
      Added value: +{
      +  "description": "Which connected Google account to create in, by its address, when the user has more than one — see get_status connections. Omit for the primary account.",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • removedOutput schema / additionalProperties
      Removed value: -false
  4. First observed

TDQS

A4.5/5.0
Behavior4/5

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

Annotations already signal destructiveHint=true and readOnlyHint=false. The description adds that passing file_id replaces an existing document's content and that omitting it creates a new doc, which clarifies what side effect may occur. It also lists the markdown constructs that get rendered. It does not mention irreversibility or permission requirements, but the destructive annotation already covers the safety profile.

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 tightly written sentences with no filler. The core action and formatting scope are front-loaded, followed by sibling guidance and the create-vs-replace behavior. Every sentence earns its place.

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?

Given the high schema coverage, presence of an output schema, and clear annotations, the description covers the essential decisions: what the tool does, when to use it over siblings, and how file_id changes the operation. No critical guidance is missing for an agent to invoke it correctly.

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 all four parameters are documented. The description mostly repeats the file_id behavior and markdown feature list already present in the schema, and it adds no new meaning for title or account. This matches the baseline for high schema coverage.

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: 'Write markdown content into a Google Doc with full formatting' and enumerates supported formatting (headings, bold, italic, bullets, numbered lists, links, horizontal rules). It also explicitly distinguishes itself from create_document and update_document, so an agent can tell what this tool is for.

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 directly says to use this tool 'instead of create_document or update_document when the content has structure that should be visually formatted.' It also gives a concrete decision rule: pass file_id to replace existing content, or omit to create a new doc. This is explicit, actionable guidance.

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