tinta-mcp
v0.2.3Tinta: Give your AI a vector editor (Model Context Protocol server for Inkscape)
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
create_shape Create Shape
Create a standard SVG shape element (rect, circle, ellipse, line, polygon, or polyline).
| Parameter | Type | Description |
|---|---|---|
element_type * | string | SVG shape tag. Use create_group to create a group. |
id * | string | Unique identifier for the element. |
attributes | Dictionary of SVG attributes (e.g. {'x': 100, 'y': 50, 'width': 200, 'height': 100, 'fill': '#3b82f6', 'stroke': '#1e293b', 'stroke_width': 2}). |
create_elements Create Elements
Create SVG elements in one batch. Each element needs a tag or type and may include an ID, an attributes object, direct SVG attributes, and nested children. Optional canvas setup, auto-framing, selection, and preview run in the same request.
| Parameter | Type | Description |
|---|---|---|
elements * | array | List of element dictionaries. Each dictionary can specify: - 'tag' (or 'type'): SVG element tag. The extension validates supported tags. - 'id': (optional) Desired element ID. - 'attributes': (optiona… |
canvas_size | (optional) Set initial dimensions with width, height, and unit (px, mm, cm, in, pt, or pc). | |
clear_canvas | boolean | (optional) If True, removes all existing drawing elements before creating new ones. |
fit_canvas | boolean | (optional) If True, automatically fits page viewBox and dimensions to all elements with padding. |
fit_padding | number | (optional) Padding in pixels for fit_canvas (default 20.0). |
group_id | (optional) Wrap all created elements inside a parent <g id="..."> group. | |
preview_max_size | integer | (optional) Max pixel dimension for preview image (default 800). |
return_preview | boolean | (optional) If True, immediately exports and returns a PNG preview screenshot in the same MCP tool call. |
select_created | boolean | (optional) If True, selects the created elements in Inkscape's user interface. |
create_path Create Path
Create an SVG path element with path data commands.
| Parameter | Type | Description |
|---|---|---|
d * | string | SVG path definition data string (e.g. 'M 10 10 L 90 90 Z', 'C 20 20 40 40 50 50'). |
id * | string | Unique identifier for the path element. |
attributes | Optional extra attributes (e.g. {'stroke_linecap': 'round', 'opacity': 0.8}). | |
fill | string | Fill color or 'none'. |
stroke | string | Stroke color (hex or named color, e.g. '#22c55e', 'black'). |
stroke_width | number | Stroke width in pixels. |
create_text Create Text
Create an SVG text element. Tip: For logos, wordmarks or precise kerning, prefer geometric vector paths or keep words in a single text element, as individual letter kerning depends on local OS fonts.
| Parameter | Type | Description |
|---|---|---|
id * | string | Unique identifier for the text element. |
text * | string | Text string content to display. |
x * | number | X coordinate position. |
y * | number | Y coordinate position (baseline). |
attributes | Optional extra attributes (e.g. {'font_weight': 'bold', 'text_anchor': 'middle'}). | |
fill | string | Text color. |
font_family | string | Font family name (e.g. 'sans-serif', 'Arial'). |
font_size | number | Font size in pixels. |
create_group Create Group
Create an SVG group (<g>), optionally moving contiguous siblings into it. Existing elements must share a parent and form a contiguous range in paint order. Documents containing CSS stylesheets are rejected because regrouping can change CSS matching.
| Parameter | Type | Description |
|---|---|---|
id * | string | Unique identifier for the group. |
children_ids | Optional IDs of existing contiguous sibling elements to move into the group. |
modify_elements Modify Elements
Atomically modify non-ID attributes of existing elements in a batch. Each item needs a non-empty ID and a non-empty attributes object.
| Parameter | Type | Description |
|---|---|---|
elements * | array | Non-empty list of objects, each with an existing 'id' and a non-empty 'attributes' object. |
fit_canvas | boolean | Automatically fit page viewBox and dimensions to all elements after modification. |
fit_padding | number | Padding in pixels when fit_canvas is True (default 20.0). |
preview_max_size | integer | Maximum pixel dimension for preview image (default 800). |
return_preview | boolean | Immediately capture and return a PNG preview screenshot in the same MCP tool call. |
delete_elements Delete Elements
Delete one or more existing SVG elements by ID in a single batch. Pass IDs as a list; use a one-item list to delete one element.
| Parameter | Type | Description |
|---|---|---|
ids * | array | Non-empty list of existing element IDs. Use a one-item list to delete one element. |
preview_max_size | integer | Maximum pixel dimension for preview image (default 800). |
return_preview | boolean | Immediately capture and return a PNG preview screenshot in the same MCP tool call. |
path_boolean_operation Path Boolean Operation
Perform native boolean operations on existing SVG paths. All operations need two paths except combine and break-apart, which accept one. Difference follows canvas paint order.
| Parameter | Type | Description |
|---|---|---|
element_ids * | array | Existing path IDs. All operations except combine and break-apart need at least two; those two need one. Duplicate IDs are rejected. |
operation * | string | Boolean operation to apply: - 'union': Fuse paths into a single shape. - 'difference': Subtract paths according to Inkscape canvas paint order. The IDs identify participants; their list order does not… |
preview_max_size | integer | Maximum pixel dimension for preview image (default 800). |
return_preview | boolean | Immediately capture and return a PNG preview screenshot in the same MCP tool call. |
apply_mask Apply Mask
Apply or remove a clip or luminance mask on an element or group. Applying moves the stencil into definitions. Transformed targets or stencils, inherited or class-based styles, and CSS stylesheets are unsupported.
| Parameter | Type | Description |
|---|---|---|
target_id * | string | ID of the element or group to be clipped or masked. |
mask_id | ID of the element serving as the clipping shape or mask stencil (required unless remove=True). | |
mode | string | Masking mode: - 'clip': Hard boundary clipping via <clipPath>. Areas outside the mask shape are hidden (default). - 'luminance': Smooth transparency masking via <mask>. Grayscale luminance values dete… |
preview_max_size | integer | Maximum pixel dimension for preview image (default 800). |
remove | boolean | If True, removes any existing clip-path and mask attributes from the target element. |
return_preview | boolean | Immediately capture and return a PNG preview screenshot in the same MCP tool call. |
get_document_info Get Document Info
Get metadata about the current document: dimensions, viewBox, and element counts.
list_elements List Elements
List a page of SVG elements in document order, including definitions. Summaries include tag, ID, Inkscape label, parent ID, and depth. Limit is 1 to 500; offset starts at zero.
| Parameter | Type | Description |
|---|---|---|
limit | integer | |
offset | integer |
get_element_info Get Element Info
Get the complete attributes and parsed inline style of one element by its ID.
| Parameter | Type | Description |
|---|---|---|
element_id * | string |
get_selection Get Selection
Get information about elements currently selected by the user in the Inkscape UI.
fit_canvas_to_elements Fit Canvas To Elements
Automatically adjust the SVG viewBox and page dimensions to frame all drawing elements with padding. Tip: Best used on geometric shapes and paths; long text elements with wide letter-spacing may overestimate canvas bounds.
| Parameter | Type | Description |
|---|---|---|
padding | number | Padding in pixels around the bounding box of elements (default 20.0). |
set_canvas_size Set Canvas Size
Set canvas width, height, and viewBox using px, mm, cm, in, pt, or pc units.
| Parameter | Type | Description |
|---|---|---|
height * | number | Canvas height. |
width * | number | Canvas width. |
unit | string | Canvas measurement unit: px, mm, cm, in, pt, or pc (default px). |
clear_canvas Clear Canvas
Clear drawing elements while preserving definitions, named view, metadata, title, description, and styles.
export_preview Export Preview
Export and return a PNG screenshot image of the current Inkscape document. Uses native Inkscape D-Bus actions for sub-second export.
| Parameter | Type | Description |
|---|---|---|
max_size | integer | Maximum pixel dimension for the exported image (default 800). |