Skip to main content
Glama

Save document as

save_document_as
Destructive

Persist the current working-copy state of an Inkscape document to a new file in the workspace, with support for relative paths and automatic subfolder creation.

Instructions

Save a document's current working-copy state to a NEW file in the workspace.

When to use: persisting the working copy to disk. To export a raster/PDF instead use export_document; to snapshot in-server state (not a file) use create_snapshot. The original and source files are never touched.

Key params: dest_path may be RELATIVE or absolute — relative anchors to the FIRST configured workspace root (NOT the server CWD); absolute must resolve inside a configured root. A dest into a not-yet-existing SUBFOLDER (e.g. "output/final.svg") is supported: missing parents are created only after proving they resolve INSIDE the workspace (a ..-escaping / out-of-sandbox dest creates nothing and is rejected with path rejected: outside workspace). The dest is sandbox- and symlink-checked (incl. a pre-existing symlink at the final name) and the copy never follows a symlinked dest (sec.12). Overwriting an existing file requires overwrite=True PLUS a non-empty approval_token.

Return shape: SaveResultsaved_path (workspace-relative POSIX), operation_id, overwritten, and pre_validation / post_validation (the validate_document reports from before and after the write).

Example: save_document_as(doc_id, "output/final.svg")

Risk class: medium for a new-file save; high (approval-gated) when overwriting an existing file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
dest_pathYes
overwriteNo
approval_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
saved_pathYes
overwrittenYes
operation_idYes
pre_validationYesStructured, machine-readable validation result for one document. `ok` is True iff there are no `error`-severity findings. `error_count` / `warning_count` are convenience tallies over `findings`.
post_validationYesStructured, machine-readable validation result for one document. `ok` is True iff there are no `error`-severity findings. `error_count` / `warning_count` are convenience tallies over `findings`.
Behavior5/5

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

The description discloses behavioral traits beyond annotations, such as path resolution rules, sandbox checks, symlink handling, and overwrite requirements. It adds valuable context not captured in annotations.

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 description is well-structured with clear sections and every sentence adds value, but it is somewhat lengthy. Could be slightly more concise without losing information.

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 tool's complexity (4 parameters, output schema present), the description is complete. It covers all key behaviors, edge cases (path escaping, symlinks), return shape, and risk class. No gaps identified.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since schema description coverage is 0%, the description fully compensates by explaining dest_path semantics (relative/absolute, subfolder creation, sandbox checks), overwrite requirement, and approval_token. This is crucial for correct usage.

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 clearly states the tool's purpose: 'Save a document's current working-copy state to a NEW file in the workspace.' It uses specific verbs and resources, and distinguishes itself from siblings like export_document and create_snapshot.

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 describes when to use the tool ('persisting the working copy to disk') and when not to (use export_document for raster/PDF, create_snapshot for in-server state). Also notes that original and source files are never touched, providing clear guidance.

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