Skip to main content
Glama

Move invoice draft

well_move_invoice_draft
DestructiveIdempotent

Move one open draft invoice to the workspace of the company that issues it, with every part. That workspace's own company becomes the issuer; the customer, the lines, the prices, the VAT, the currency, the dates, the design and the payment account stay as they were. The draft in this workspace is deleted, and its page link opens the moved draft.

REQUIRED: invoice_id (the open draft in this workspace), target_workspace_id (the workspace of the issuing company).

Returns the moved draft's invoice_id and reference_number in the target workspace: every later call on this draft uses them with target_workspace_id as the workspace. outcome "already_moved" means an earlier call moved it; nothing was written again. Any other outcome moved nothing, and error says why.

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
invoice_idYesThe open draft to move, in the workspace of the call.
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.
target_workspace_idYesThe workspace of the company that issues the invoice: the draft moves there.

Output Schema

NameRequiredDescriptionDefault
errorNo
outcomeNo
successYes
link_keptNo
invoice_idNo
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.
reference_numberNo
resolved_workspaceNoThe workspace that answered, when the caller named none and the token authorizes several.
target_workspace_idNo
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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • removedOutput schema / properties / reference_number / anyOf
      Removed value: -[
      -  {
      -    "type": "string"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / reference_number / type
      Added value: +[
      +  "string",
      +  "null"
      +]
    • 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. Added

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the annotations (destructiveHint=true, idempotentHint=true), it discloses that the source draft is deleted, that its page link repoints to the moved draft, that retries return "already_moved" with nothing re-written, and that any other outcome moved nothing with the error explaining why. This is exactly the context an agent needs before an irreversible cross-workspace move.

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?

Well front-loaded: purpose, then what is preserved, then side effects, then REQUIRED params, then return semantics, then workspace scoping. The "REQUIRED" line duplicates the schema's required array, and the preserved-fields list is long, but each block serves a distinct decision the caller must make.

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 a destructive, cross-workspace, idempotent mutation with 6 parameters, the description covers preconditions, what is destroyed, what is preserved, workspace/token disambiguation, and outcome codes — even explaining the key return values despite an output schema existing. Nothing material is missing for a correct invocation.

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 would be 3, but the description adds real meaning: invoice_id must be the open draft *in this workspace*, target_workspace_id is the workspace of the *issuing* company, and workspace_id's conditional requirement is restated as a write-lands-in-one-workspace rule. It leaves conversation_id, idempotency_key, and workspace_scope entirely to the schema.

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 opens with a specific verb and resource ("Move one open draft invoice") plus the scope of the move (to the issuing company's workspace, "with every part"). It precisely enumerates what moves and what stays, which distinguishes it from siblings like well_update_invoice or well_delete_invoice without needing their schemas.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives concrete usage conditions: call directly when the token authorizes one workspace, pass workspace_id when it authorizes several, and treat outcome "already_moved" as a no-op from an earlier call. It does not explicitly name alternative sibling tools, so it stops short of full when/when-not routing, but the conditions it does give are actionable.

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