Place document
place_documentPlace existing geometries from one document into another at chosen coordinates and scale, avoiding manual re-authoring or extraction.
Instructions
Place an existing document or object INTO another document at (x, y) with scale.
When to use: re-composing existing geometry cross-document without re-authoring or extracting
SVG by hand — the single-asset companion of compose_grid. To lay out MANY assets in a grid use
compose_grid; to graft agent-COMPOSED markup use insert_svg_fragment; to instance a
same-document object use create_use.
Key params: supply EXACTLY ONE source — source_doc_id (place that whole document's root) OR
object_id together with source_doc_id (place that one object from the source document). The
source subtree is deep-copied (every id re-minted, intra-clone refs rewritten, no id clashes —
the source is NEVER mutated) and wrapped in a <g> translated to (x, y) and uniformly scaled
by scale (> 0) about that origin. The whole place lands under ONE snapshot + Operation Record.
Return shape: PlaceResult — an EditResult (reversible via restore_snapshot) plus
target_doc_id, placed_id (the new wrapper-group id), and source (a short label).
Example: place_document("sheet", 100, 0, source_doc_id="logo") drops the whole logo document
into sheet at (100, 0); place_document("sheet", 0, 0, source_doc_id="kit", object_id="star")
places just the star object from kit.
Render and look before you trust this edit: render with render_preview (or live_render_view)
and inspect the result before relying on it; restore_snapshot reverts it if it is wrong.
Risk class: medium (write-new on the target working copy, reversible; sources never mutated).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| scale | No | ||
| object_id | No | ||
| source_doc_id | No | ||
| target_doc_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| source | Yes | ||
| changed | Yes | ||
| summary | No | ||
| placed_id | Yes | ||
| snapshot_id | Yes | ||
| operation_id | Yes | ||
| preview_after | No | ||
| target_doc_id | Yes | ||
| preview_before | No |