tinta-mcp

v0.2.3
tinta-mcp Checked 3 days ago Published 1 month ago

Tinta: 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).

ParameterTypeDescription
element_type *stringSVG shape tag. Use create_group to create a group.
id *stringUnique identifier for the element.
attributesDictionary 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.

ParameterTypeDescription
elements *arrayList 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_canvasboolean(optional) If True, removes all existing drawing elements before creating new ones.
fit_canvasboolean(optional) If True, automatically fits page viewBox and dimensions to all elements with padding.
fit_paddingnumber(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_sizeinteger(optional) Max pixel dimension for preview image (default 800).
return_previewboolean(optional) If True, immediately exports and returns a PNG preview screenshot in the same MCP tool call.
select_createdboolean(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.

ParameterTypeDescription
d *stringSVG path definition data string (e.g. 'M 10 10 L 90 90 Z', 'C 20 20 40 40 50 50').
id *stringUnique identifier for the path element.
attributesOptional extra attributes (e.g. {'stroke_linecap': 'round', 'opacity': 0.8}).
fillstringFill color or 'none'.
strokestringStroke color (hex or named color, e.g. '#22c55e', 'black').
stroke_widthnumberStroke 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.

ParameterTypeDescription
id *stringUnique identifier for the text element.
text *stringText string content to display.
x *numberX coordinate position.
y *numberY coordinate position (baseline).
attributesOptional extra attributes (e.g. {'font_weight': 'bold', 'text_anchor': 'middle'}).
fillstringText color.
font_familystringFont family name (e.g. 'sans-serif', 'Arial').
font_sizenumberFont 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.

ParameterTypeDescription
id *stringUnique identifier for the group.
children_idsOptional 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.

ParameterTypeDescription
elements *arrayNon-empty list of objects, each with an existing 'id' and a non-empty 'attributes' object.
fit_canvasbooleanAutomatically fit page viewBox and dimensions to all elements after modification.
fit_paddingnumberPadding in pixels when fit_canvas is True (default 20.0).
preview_max_sizeintegerMaximum pixel dimension for preview image (default 800).
return_previewbooleanImmediately 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.

ParameterTypeDescription
ids *arrayNon-empty list of existing element IDs. Use a one-item list to delete one element.
preview_max_sizeintegerMaximum pixel dimension for preview image (default 800).
return_previewbooleanImmediately 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.

ParameterTypeDescription
element_ids *arrayExisting path IDs. All operations except combine and break-apart need at least two; those two need one. Duplicate IDs are rejected.
operation *stringBoolean 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_sizeintegerMaximum pixel dimension for preview image (default 800).
return_previewbooleanImmediately 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.

ParameterTypeDescription
target_id *stringID of the element or group to be clipped or masked.
mask_idID of the element serving as the clipping shape or mask stencil (required unless remove=True).
modestringMasking 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_sizeintegerMaximum pixel dimension for preview image (default 800).
removebooleanIf True, removes any existing clip-path and mask attributes from the target element.
return_previewbooleanImmediately 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.

ParameterTypeDescription
limitinteger
offsetinteger

get_element_info Get Element Info

Get the complete attributes and parsed inline style of one element by its ID.

ParameterTypeDescription
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.

ParameterTypeDescription
paddingnumberPadding 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.

ParameterTypeDescription
height *numberCanvas height.
width *numberCanvas width.
unitstringCanvas 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.

ParameterTypeDescription
max_sizeintegerMaximum pixel dimension for the exported image (default 800).