Skip to main content
Glama

figma_insert_svg

Insert raw SVG/vector code into a Figma canvas or AutoLayout container with resizing, color overrides, optional components, and PNG capture.

Instructions

Insert raw SVG/vector code directly into Figma canvas or target AutoLayout container with automatic scale-proportional resizing, fill/stroke color overrides, optional component creation, and an optional PNG screenshot (capture: true).

Input Schema

NameRequiredDescriptionDefault
nameNoOptional layer name for the created SVG node (e.g. 'Icon / Shield', 'Brand / Google')
scaleNoScreenshot resolution scale factor (default: 2.0)
widthNoDesired width in pixels (e.g. 24, 32, 48)
heightNoDesired height in pixels (e.g. 24, 32, 48)
targetNofileName of a specific connected Figma document, when more than one is open (see figma_list_targets).
captureNoWhether to capture and return a PNG screenshot of the inserted SVG (default: false)
positionNoOptional placement coordinates or child index in AutoLayout container
svg_codeYesRaw XML/SVG string (e.g. '<svg xmlns="..." viewBox="0 0 24 24">...</svg>')
as_componentNoWhether to wrap the resulting SVG node into a reusable master ComponentNode (default: false)
fill_overrideNoSpecific fill color override (Hex e.g. '#FFFFFF' or RGB) applied to vector shapes with non-empty fills
color_overrideNoUniversal color override (Hex '#6366F1' or RGB) applied to all active fills and strokes
stroke_overrideNoSpecific stroke color override (Hex e.g. '#6366F1' or RGB) applied to vector paths with non-empty strokes
target_parent_idNoTarget container/frame node ID to insert the SVG into. If omitted, inserts into current selected frame or active page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare non-readOnly, non-destructive, non-idempotent, and closed-world behavior. The description adds useful context beyond annotations: automatic scale-proportional resizing, fill/stroke overrides, optional component creation, and optional PNG screenshot return. It does not mention permission requirements or effects on existing canvas selection.

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?

A single front-loaded sentence that names the core action and key options without filler. It is dense but every clause maps to a real capability or parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 13-parameter tool with a nested position object and no output schema, the description plus full schema coverage is sufficient for correct invocation. It omits what the tool returns beyond the optional PNG screenshot, but annotations and schema carry the remaining safety and parameter detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 13 parameters thoroughly. The description mentions overrides, component creation, capture, and AutoLayout placement, but mostly restates capabilities already covered by the schema and adds no precedence rules for competing color overrides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (Insert) and resource (raw SVG/vector code) and scopes it to the Figma canvas or a target AutoLayout container. It does not explicitly compare itself to related tools such as figma_insert_component_instance, so sibling differentiation is indirect.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides no explicit when-to-use or when-not-to-use guidance and does not name alternatives like figma_insert_component_instance or figma_execute_code. Usage is only implied by the tool's action and optional features.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.