Skip to main content
Glama

Export document

export_document
Read-only

Export the entire document to PNG, PDF, or SVG for final output. Accepts pixel width for PNG and sandbox-checked output directory.

Instructions

Export the whole document to PNG, PDF, or SVG.

When to use: producing a final file of the whole document. For one object use export_object; for many sizes/formats at once use export_batch; for a web/print bundle use the profile tools.

Key params: format is one of "png"/"pdf"/"svg" (others rejected). PNG honors width_px (pixel-capped before Inkscape runs); PDF/SVG are vector and ignore it. out_dir writes into a caller-chosen dir — a relative out_dir anchors to the workspace ROOT and is sandbox-checked (out-of-workspace is rejected with "path rejected: outside workspace"); name_prefix tags the filename. INLINE RASTER: a PNG is returned inline by default (gated by max_output_bytes); PDF/SVG are never embedded; inline=False opts out.

Return shape: ExportResultartifact_path / workspace_relative_path (same value), format, width_px/height_px (TRUE size for PNG, None for vector), stale. With an inline image, a ToolResult carrying the same fields plus the image block.

Example: export_document(doc_id, "png", width_px=1024)

Risk class: low (render/export to a sandbox-checked dir; no original overwrite).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
formatYes
inlineNo
out_dirNo
width_pxNo
name_prefixNo
max_output_bytesNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
staleNo
doc_idYes
formatYes
width_pxYes
all_blankNo
height_pxYes
is_vectorNo
opaque_pxNo
artifact_pathYes
fonts_outlinedNo
workspace_relative_pathYes
Behavior5/5

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

Describes sandbox-checked directory, inline behavior, format-specific parameter handling, and return shape. Annotations only indicate readOnly hint; description adds crucial behavioral 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 sections for purpose, usage, key params, return shape, example, and risk class. Every sentence is informative and front-loaded.

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 7 parameters and output schema, the description covers return shape, inline image handling, parameter behavior, and risk class. It is comprehensive for the tool's complexity.

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?

Despite 0% schema coverage, the description thoroughly explains key parameters (format, width_px, out_dir, name_prefix, inline, max_output_bytes) with constraints and behaviors, adding significant meaning.

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 'Export the whole document to PNG, PDF, or SVG,' specifying the verb, resource, and supported formats. It distinguishes from siblings like export_object, export_batch, and profile tools.

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: 'producing a final file of the whole document' and lists alternatives for one object, batch, or bundle, 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