Skip to main content
Glama

proj_print_all_variants

Export a PDF for every project variant by activating each in turn and restoring the originally active variant afterward.

Instructions

Export a PDF for every project variant.

Loops the project's variants; for each it sets that variant active and runs the (silent) PDF export, writing one <variant>.pdf per variant. The originally-active variant is restored at the end. Composes the existing proj_set_active_variant + proj_export_pdf paths -- no new export machinery.

Args: output_dir: Folder for the per-variant PDFs. Defaults to the workspace directory. project_path: Optional project path. If None, uses the focused project.

Returns: {"exported": [{variant, output_path, ok, error}], "count"} plus restored: the variant put back, or null if putting it back FAILED. Null is not cosmetic. This loop leaves the project on the last variant it exported, so a null means the active variant is not the one you started with, and anything variant-sensitive run afterwards (an export, a BOM, pcb_apply_dnp_paste_exclusion) will act on the wrong set. A failure also carries restore_error, active_variant_unknown and a note.

Input Schema

NameRequiredDescriptionDefault
output_dirNo
project_pathNo

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 well: it discloses the critical side effect (variants are activated in turn), that the original variant is restored, and — importantly — that a null `restored` means the restore FAILED, leaving the project on the wrong variant and corrupting any subsequent variant-sensitive operation. It also names the accompanying failure fields (restore_error, active_variant_unknown, note).

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 purpose sentence, then behavior, Args, and Returns in a scannable structure. It is somewhat long and the Returns paragraph restates the restore warning at length, but that verbosity is justified by the failure consequence, and nothing is wasted.

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 multi-step export tool with a real state-mutation risk, the description covers inputs, output shape, side effects, and failure semantics. Even though an output schema exists, the extra explanation of `restored`/`restore_error` adds the exact guidance an agent needs to act safely.

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, explaining output_dir (per-variant PDF folder, defaults to workspace directory) and project_path (optional; None uses the focused project). Both parameters are given meaning beyond the bare 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?

States a specific verb and resource — 'Export a PDF for every project variant' — and the 'loops the project's variants' framing distinguishes it from the single-export sibling proj_export_pdf and from proj_export_variant_matrix_csv. An agent can tell what it produces (one <variant>.pdf per variant) without opening the schema.

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?

Gives clear context: it loops all variants, composes proj_set_active_variant + proj_export_pdf, and defaults to the focused project when project_path is None. It does not explicitly say 'use proj_export_pdf instead for a single variant,' so there is no hard exclusion, but the all-variants scope is unambiguous.

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