Skip to main content
Glama

Export object

export_object
Read-only

Export a single object by its ID to PNG, PDF, or SVG, automatically clipped to its bounding box. Use to extract a specific element from a document.

Instructions

Export a single object (by id) to PNG, PDF, or SVG.

When to use: exporting one object, clipped to its own bbox (get the id from find_objects). For the whole document use export_document; for many at once use export_batch.

Key params: object_id must exist and match the safe SVG-id charset (else rejected before it reaches Inkscape). format is one of "png"/"pdf"/"svg". 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 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_object(doc_id, "logo", "svg")

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
formatNopng
inlineNo
out_dirNo
width_pxNo
object_idYes
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?

Annotations already indicate safe read-only operation. Description adds extensive behavioral details: validation of object_id charset, sandbox checking for out_dir, inline PNG behavior gated by max_output_bytes, and return shape including stale flag.

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-organized with front-loaded purpose, clear paragraphs, and an example. Slightly verbose in explaining inline behavior but still efficient overall.

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 all 8 parameters, explains return shape (ExportResult), mentions risk class, and gives usage context with sibling differentiation. Output schema exists, but description adds value for inline image handling.

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?

With 0% schema description coverage, the description compensates fully. It explains the role and constraints of object_id, format, out_dir, name_prefix, inline, and max_output_bytes, adding meaning beyond 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 clearly states 'Export a single object (by id) to PNG, PDF, or SVG.' It distinguishes from siblings by naming 'export_document' and 'export_batch' as alternatives for 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: exporting one object, clipped to its own bbox' and provides when-not scenarios with specific sibling tool names.

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