Skip to main content
Glama

proj_export_image

Exports the active schematic or PCB document to PDF without a dialog; focus the target tab first. Raster formats require a configured OutJob.

Instructions

Export the active schematic / PCB document, silent (no dialog).

Only format="pdf" is currently supported as a silent path. Raster formats (png/jpg/bmp) require a hand-configured OutJob with a Schematic Print -> Multimedia (Image) container; the Pascal side rejects them with IMAGE_FORMAT_UNSUPPORTED and points the caller at proj_run_outjob instead.

The PDF path uses Altium's WorkspaceManager:Print server process with FileName= - the same machinery as proj_export_pdf. No OutJob is loaded. The print runs against Client.CurrentView (the focused document), so ensure the schematic or PCB you want exported is the active tab before calling.

The Pascal side deletes any pre-existing file at output_path before running so the post-run FileExists probe is a true existence check. Python verifies again here and downgrades a Pascal "success" to EXPORT_FILE_MISSING if no file landed.

Args: output_path: Full path for the output file. The directory must already exist. The extension should be .pdf. format: Output format. Only "pdf" is silent today (default). "png", "jpg", "bmp" return an explicit IMAGE_FORMAT_UNSUPPORTED error. width: Kept for API compatibility. Unused by the PDF path. height: Kept for API compatibility. Unused by the PDF path.

Returns: Dictionary confirming the export with the resolved path, format, width, height, and the scoped schematic. Sets file_exists based on a Python-side existence check.

Input Schema

NameRequiredDescriptionDefault
widthNo
formatNopdf
heightNo
output_pathYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so: it discloses that the Pascal side deletes any pre-existing file at output_path (a destructive side effect), that the print runs against Client.CurrentView, that no OutJob is loaded, and that Python downgrades false successes to EXPORT_FILE_MISSING. These are exactly the non-obvious traits an agent needs.

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?

Front-loaded with the core behavior, then structured into mechanism, caveats, and Args/Returns. A few sentences are redundant (Python rechecking the file after the Pascal probe) but nothing is filler at the level of noise.

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 four-parameter export tool with no annotations, the description covers mechanism, side effects, prerequisites, error codes, and per-parameter behavior. The Returns section overlaps with the existing output schema but adds the file_exists verification semantics, so the picture is complete.

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?

Schema description coverage is 0%, so the description must compensate and it does: output_path requires an existing directory and a .pdf extension, format documents the sole supported value plus the explicit error for each unsupported value, and width/height are flagged as unused compatibility parameters. That prevents an agent from wasting calls on raster output or expecting width/height to matter.

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?

States a specific verb and resource (export the active schematic / PCB document) plus a key modifier (silent, no dialog). An agent can immediately tell this is an export-to-file operation against the focused document, distinct from mutation or query siblings.

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?

Explicitly says only format="pdf" takes the silent path and routes raster formats to proj_run_outjob with IMAGE_FORMAT_UNSUPPORTED. It also gives the prerequisite that the target document must be the active tab. It does not, however, distinguish itself from proj_export_pdf even though it admits using the same machinery, leaving that choice ambiguous.

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

Deploy Server

Other Tools