Create text
create_textAdd a new text label at specified coordinates in an Inkscape document. Use for inserting captions or annotations without altering existing elements.
Instructions
Create a <text> element anchored at (x, y) holding text.
When to use: adding a new label / caption. To change EXISTING text content use replace_text;
to restyle its font use set_font.
Key params: text is length-bounded and rejects control characters other than tab / newline /
carriage return (stored as a text node, no markup injection); inserted into parent_id (must
exist) or the document default parent. Optional fill / stroke / stroke_width
paint the glyphs in this call (validated like set_fill / set_stroke; default None =
unpainted). For font family/size/weight use set_font.
Return shape: CreateResult — object_id (new id), bbox=None (text is not analytically
measured), plus the pipeline fields (operation_id, snapshot_id, changed, preview).
Example: create_text(doc_id, 20, 40, "Hello", fill="#111")
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 (reversible write-new on the working copy; original untouched).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | Yes | ||
| y | Yes | ||
| fill | No | ||
| text | Yes | ||
| doc_id | Yes | ||
| stroke | No | ||
| object_id | No | ||
| parent_id | No | ||
| stroke_width | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bbox | No | ||
| doc_id | Yes | ||
| changed | Yes | ||
| summary | No | ||
| object_id | Yes | ||
| snapshot_id | Yes | ||
| operation_id | Yes | ||
| preview_after | No | ||
| preview_before | No |