Skip to main content
Glama

sch_render_svg

Generate a self-contained SVG visualization of the active schematic for layout, readability review, sharing, or CI thumbnails, with tagged elements for downstream interactive overlays.

Instructions

Render the active SchDoc to an SVG file (in-house renderer).

SCOPE: this is a VISUAL artifact for when an image is genuinely needed (layout/readability review, sharing a picture, a CI thumbnail). It is NOT an input to a design review. NEVER judge connectivity, part values, ratings, or pin functions from this render -- a wire that looks joined may not share a net, and a net can be correct while the drawing looks messy. Connectivity and part facts come from the compiled netlist + part data (proj_get_nets, proj_get_connectivity_many, obj_crossref_net, proj_get_unconnected_pins, proj_get_erc_violations, design_review_snapshot), never from a picture.

Pulls every component, pin, wire, junction, net label, port and power port from the active schematic via the bridge, then emits a self-contained SVG with data-designator, data-net, data-pin attributes on every meaningful group so a downstream consumer (the web dashboard, an LLM tool, a CI check) can hook interaction without re-parsing.

v1 draws components as labelled bounding-box bodies with pin stubs from the body to the electrical end. Full symbol-internal primitives (rectangles / lines / arcs inside each symbol) are deferred to v2 -- the v1 output is recognisable and ready for interactive overlay but does not yet draw the actual symbol art.

Args: output_path: Where to write the SVG. Defaults to the transient <workspace>/renders/ dir (kept out of the workspace root so renders don't pile up in your folder). margin_mils: Padding around the geometry bbox in mils (default 200). flip_y: When True (default) flip the Y axis so the output reads in Altium's conventional bottom-left-origin space rather than SVG's top-left-origin.

Returns: Dict with ok, svg_path, doc, counts (one entry per primitive type).

Input Schema

NameRequiredDescriptionDefault
flip_yNo
margin_milsNo
output_pathNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.1

TDQS

A4.9/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 the extraction path (bridge pull of components, pins, wires, junctions, net labels, ports, power ports), the emitted structure (self-contained SVG with data-designator/data-net/data-pin attributes for downstream consumers), and an honest v1 limitation (bounding-box bodies with pin stubs; symbol-internal primitives deferred to v2). It also explains the default output location is a transient renders dir kept out of the workspace root.

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 front-loaded: purpose first, then SCOPE, then behavior, then Args/Returns. The connectivity warning is repeated across two paragraphs ('NEVER judge connectivity...' and 'Connectivity and part facts come from...'), which is slightly redundant, but every remaining sentence adds a distinct fact about output structure or v1 limits.

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 render/export tool with an output schema, the definition covers what an agent still needs: what gets drawn in v1, what does not, where the file lands, and which tools to consult instead for electrical facts. The Returns block is somewhat duplicative of the output schema but not harmful.

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 for all three parameters: output_path with its default transient directory and the rationale, margin_mils as padding around the geometry bbox in mils with default 200, and flip_y with the coordinate-space reason it defaults to True. No parameter is left to guesswork.

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?

Opens with a specific verb+resource+target format: 'Render the active SchDoc to an SVG file (in-house renderer).' It immediately distinguishes itself from pcb_render_svg and the generic image/PDF exporters by naming the source document type and the in-house renderer, and the SCOPE paragraph further pins down that the output is a visual artifact, not a data source.

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?

The SCOPE section gives an explicit when-to-use list (layout/readability review, sharing a picture, CI thumbnail) and an explicit when-NOT-to-use rule ('NEVER judge connectivity, part values, ratings, or pin functions from this render'), then names six concrete alternative tools for the excluded use cases. This is exactly the routing information an agent needs to avoid misusing a picture as design truth.

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