Skip to main content
Glama

Reload document

reload_document
Read-onlyDestructive

Refresh the current document from its source file, discarding any unsaved edits while keeping the same document ID. A pre-reload snapshot is saved for undo.

Instructions

Refresh a working copy FROM ITS SOURCE under the SAME doc_id, discarding working edits.

When to use: external edits changed the source file and you want to resync in place (keep the same doc_id). To undo a single edit instead use restore_snapshot; to open a different file use open_document.

Key params: doc_id must be open. Flow (reversible): take a PRE-reload snapshot of the current working copy (undo via restore_snapshot), re-resolve the source through the sandbox and re-validate it is STILL inside the workspace (a moved/vanished source is rejected with a stable "path rejected" message), then re-copy the source over the working copy. A create_document document has no external source, so its reload restores from its blank seed.

Return shape: ReloadDocumentResult — refreshed summary plus pre_reload_snapshot_id (the pre-reload checkpoint).

Example: reload_document(doc_id)

Risk class: low (only the working copy is rewritten, reversibly; the original is never written).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
summaryYesTop-level document summary (viewBox / page / size / counts).
pre_reload_snapshot_idYes
Behavior5/5

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

Provides detailed behavioural flow: pre-reload snapshot, re-resolving source, validation, rejection message. Discloses that create_document reloads from blank seed, and risk class (low, reversible, only working copy rewritten). Adds context beyond annotations.

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?

Well-organized with clear front-loaded purpose, usage, behavioral details, return shape, example, and risk. No superfluous sentences.

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?

Covers purpose, usage, behavior, parameter, return shape (output schema exists), example, and risk. Complete for the tool's complexity and single parameter.

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 schema coverage at 0%, description compensates by explaining doc_id must be open and is the only parameter. Could elaborate more on doc_id format or constraints, but sufficient.

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?

Clearly states the tool refreshes a working copy from its source under the same doc_id, discarding edits. Distinguishes from siblings restore_snapshot and open_document by specifying different use cases.

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?

Explicitly states when to use (external edits changed source, want to resync in place), when not to use (for undo or opening different file), and names alternative tools.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jjjsood/inkscape-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server