Skip to main content
Glama

Refresh a document from a workbook

refresh_document
Destructive

Update a Word report or PowerPoint deck from an Excel workbook by refreshing bound markers with current values, tables, and charts; preview changes before saving, and write all or nothing.

Instructions

Update a Word report or PowerPoint deck from an Excel workbook in one call: this month's numbers, tables and charts from this month's workbook. source is the document and workbookSource the workbook, both as edit_document takes source; workbookConnectionId defaults to connectionId. The document says what to update through markers that name a workbook range, written by the bindData operation or by hand: a Word content control or PowerPoint text shape bound to one cell takes its displayed value, number format applied; a bound table is filled from its range, growing or shrinking by rows; a bound chart takes its range with the series names in the first row and the categories in the first column, and keeps its colours and layout. A range is Sheet!B2, 'Sheet name'!A1:D6, a defined name, or an Excel table name. Run with preview=true first: it lists every binding and what it will write, and saves nothing. A refresh is all or nothing - if any binding cannot be read, nothing is written and each problem is listed. saveMode and newName behave as in apply_plan; NewVersion keeps last month's document beside the new one. Returns the edit_document shape plus bindings: [{kind, marker, reference, range, target, summary, errorCode, message}].

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "connectionId": "<connectionId>",
      "source": "<source>",
      "workbookSource": "<workbookSource>",
      "preview": "<preview>",
      "saveMode": "<saveMode>",
      "newName": "<newName>",
      "workbookConnectionId": "<workbookConnectionId>"
    },
    "name": "refresh_document"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceYes
newNameYes
previewYes
saveModeYesReplace
connectionIdYes
workbookSourceYes
workbookConnectionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.3.0

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already mark it destructive and non-idempotent, but the description adds substantial context: all-or-nothing refresh, preview writes nothing, NewVersion keeps last month's document, and the return adds per-binding diagnostics. These are exactly the behavioral details the structured annotations cannot convey.

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?

The purpose is front-loaded, then the description moves logically through parameters, binding mechanics, range syntax, preview, safety, and return shape. It is dense but every sentence adds information needed for a complex seven-parameter destructive tool.

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 workbook-driven refresh with seven required parameters and no output schema, the description covers workflow, marker semantics, range syntax, preview safety, atomic failure behavior, and return structure. An agent has enough information to call it correctly.

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?

With 0% schema description coverage, the description carries the burden and explains source vs workbookSource, the workbookConnectionId default, preview behavior, and saveMode/newName partially. Gaps remain: connectionId is only implied, and saveMode's values are deferred to apply_plan rather than defined here.

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 first sentence states a specific verb (update) and resources (Word report or PowerPoint deck from an Excel workbook) and scope (in one call). The marker/binding explanation makes clear this is workbook-driven refresh rather than a generic edit or planning tool.

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 a clear use case (this month's numbers, tables and charts from this month's workbook) and an explicit safe workflow: run with preview=true first, which lists bindings and saves nothing. It does not explicitly say when to choose this over edit_document or apply_plan, though it references them for parameter behavior.

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