Skip to main content
Glama

Export a document to a storage destination

well_save_file_to_drive
DestructiveIdempotent

Old name of well_export_document, kept until 2026-11-21: call well_export_document instead.

Export one Well document (a receipt, an invoice, a statement, a file the user dropped in the chat) to a storage destination the workspace connected. Call it when the user asks to save, copy, put or export a document to their storage, such as "save this invoice to my Google Drive".

Pass document_id: the Well document, never an invoice id. A file the user dropped in the chat is a Well document: use its document id. Pass destination: "google_drive" for Google Drive. Pass file_name only when the user names the file; it defaults to the document's file name. The user confirms on a card before the export.

A destination the workspace has not connected returns outcome: "not_connected" and writes nothing: offer to connect it. For Google Drive, Well writes only in the Well folder it created in the user's Drive. When an earlier export of the same document made a file there, the call replaces its content and keeps its link (outcome: "updated"): it never makes a duplicate. A file of another document is never replaced, even when the names match. Only the member who connected the destination can export to it; a call by another member returns outcome: "not_connection_owner". When the caller connected several accounts of the destination, the call returns outcome: "connection_choice_needed" with workspace_connector_ids: ask which one, then call again with workspace_connector_id.

Tell the user the message the result carries and give web_view_link when present. On needs_reconnect, ask the user to reconnect the destination. On failed or unconfirmed, never say the file is in the destination.

When the token authorizes one workspace, call this directly — no workspace call is needed first. When it authorizes several, this read will not guess which one you mean: pass workspace_id on the call.

Input Schema

NameRequiredDescriptionDefault
file_nameNoThe file name at the destination, only when the user names it.
destinationNoThe storage destination: "google_drive" for Google Drive, the default.google_drive
document_idYesThe Well document to export.
workspace_idNoTarget workspace. Omit when the token authorizes one workspace. Required when it authorizes several — a write lands in exactly one workspace and this call would not say which.
conversation_idNoThe conversation id returned by the previous Well result, in its meta under well/conversation_id, in its structuredContent, or in its JSON text block. Pass it back on every call in the same conversation, including a call a card makes, so the chosen workspace and the earlier answers still apply. It decides the conversation on its own: nothing the host states about the session replaces it. Omit it only on the first call of a conversation.
idempotency_keyNoOptional client-supplied key. A retried write with the same key returns the original result instead of re-applying the operation.
workspace_scopeNoRestrict this call to the family: the token's primary workspace plus the company workspaces under it that you are a member of. Unrelated authorized workspaces drop out of the read; row reads merge across the family, while a per-workspace figure still reports exactly one workspace.
workspace_connector_idNoThe connection to export to, only when several accounts of the destination are connected.

Output Schema

NameRequiredDescriptionDefault
errorNo
messageNo
outcomeNo
successYes
file_nameNo
destinationNo
drive_file_idNo
web_view_linkNo
conversation_idNoThe conversation this result belongs to. Pass it back as the conversation_id argument on every later Well call in the same conversation.
newly_connectedNoTools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: "<name> is connected.". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later.
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
conversation_id_noteNoPresent only when the server opened a fresh lane, stating that no choice recorded earlier was read.
conversation_id_sourceNoWhere the conversation id came from: the host's own request meta, the caller's argument, or a fresh lane the server opened.
workspace_connector_idNo
workspace_connector_idsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedOutput schema / properties / resolved_workspace / properties / name / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / resolved_workspace / properties / name / type
      Added value: +[
      +  "string",
      +  "null"
      +]
  2. Changed5 schema fields changed
    • addedInput schema / properties / destination
      Added value: +{
      +  "default": "google_drive",
      +  "description": "The storage destination: \"google_drive\" for Google Drive, the default.",
      +  "enum": [
      +    "google_drive"
      +  ],
      +  "type": "string"
      +}
    • changedInput schema / properties / document_id / description
      Previous value: -"The Well document to save in Google Drive."New value: +"The Well document to export."
    • changedInput schema / properties / file_name / description
      Previous value: -"The file name in Drive, only when the user names it."New value: +"The file name at the destination, only when the user names it."
    • changedInput schema / properties / workspace_connector_id / description
      Previous value: -"The Google Drive connection to save to, only when several Drive accounts are connected."New value: +"The connection to export to, only when several accounts of the destination are connected."
    • addedOutput schema / properties / destination
      Added value: +{
      +  "enum": [
      +    "google_drive"
      +  ],
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedOutput schema / properties / newly_connected / description
      Previous value: -"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. Start the reply with one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."New value: +"Tools that connected to this workspace since the last result and that no session was told about yet, oldest first. Present only when at least one tool is new. The connected-line rule says when to tell an entry; when it does, one line per entry, in the person's language: \"<name> is connected.\". Never fold several entries into one sentence. Each entry comes back once, on one result only: never repeat its line later."
  4. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, and the description substantiates them concretely: a repeat export replaces the file's content and keeps its link rather than duplicating, and a file belonging to another document is never replaced even on a name match. It also discloses the confirmation card, connection-ownership restriction, the not_connected / not_connection_owner / connection_choice_needed / needs_reconnect / failed outcomes, and that nothing is written when the destination isn't connected — far beyond what the annotations convey.

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 deprecation notice is correctly front-loaded so an agent sees the redirect first, and the remaining sentences each cover a distinct behavior (id semantics, outcomes, ownership, confirmation, multi-workspace). It is still long for a deprecated alias whose main instruction is to call another tool, and the phrase "this read will not guess which one you mean" is a mis-worded boilerplate slip for a write operation.

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?

Although an output schema exists, the description goes further by mapping outcome values to required agent behavior (offer to connect, ask which connection, ask to reconnect, never claim success on failed/unconfirmed). Combined with the confirmation-card, ownership, and multi-workspace rules, an agent has everything needed to call this correctly and report results honestly.

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 the baseline is 3, but the description adds genuine meaning: document_id is "the Well document, never an invoice id" and a chat-dropped file counts as a Well document; file_name is passed only when the user names it and otherwise defaults to the document's file name; workspace_connector_id is used only after a connection_choice_needed response. The enum value for destination and the workspace_id omission rule are only restated from the schema, keeping it just below a 5.

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+resource ("Export one Well document ... to a storage destination the workspace connected") and immediately identifies the sibling relationship: it is the old name of well_export_document, deprecated until 2026-11-21. An agent can tell exactly what this tool does and how it relates to well_export_document without opening 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?

It gives an explicit routing rule ("call well_export_document instead") plus the trigger conditions for the export behavior itself ("when the user asks to save, copy, put or export a document to their storage") with a concrete example. The multi-workspace rule ("when the token authorizes one workspace, call this directly"; otherwise pass workspace_id) is also spelled out.

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