Skip to main content
Glama

create_vector

Create vector nodes from SVG path data or coordinate points for custom icons, chart lines, and freeform curves in Figma.

Instructions

Create a vector node from SVG path data or a list of points. Use for chart lines, custom icon paths, freeform curves, or any shape that needs path data.

Examples: // Polyline (chart trend line) create_vector({ parent: "1:23", name: "TrendLine", x: 40, y: 20, width: 550, height: 240, points: [[0,144],[90,96],[180,120],[270,64],[360,80],[450,40],[540,72]], stroke: "#6366F1", strokeWeight: 2 })

// Raw SVG path (custom shape) create_vector({ parent: "1:23", name: "Wave", width: 200, height: 60, data: "M 0 30 Q 50 0 100 30 T 200 30", stroke: "linear-gradient(90deg, #8B5CF6 0%, #F97316 100%)", strokeWeight: 1.5 })

Path input — provide ONE of: points: [[x,y], ...] compiled to "M x0 y0 L x1 y1 ..." (polyline shortcut) data: "M ... L ..." raw SVG path (LLM-native; supports M, L, C, Q, A, Z)

Stroke / fill (same formats as set_stroke / set_fill): hex "#6366F1" gradient "linear-gradient(angle, #color stop%, ...)" variable qualified bare name "$Brand/Primary"

Default fill is "transparent" so the vector shows only its stroke. Pass an explicit fill if you want it filled.

When NOT to use:

  • Standard rectangles / ellipses / lines — use jsx , , elements (simpler, batch-friendly)

  • Existing vector edits — use edit / set_stroke instead

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
parentNoParent node ID. Omit to attach to the current page.
nameNoNode name (default: "Vector").
xNoX position relative to parent (default: 0).
yNoY position relative to parent (default: 0).
widthYesVector bounds width in px.
heightYesVector bounds height in px.
dataNoRaw SVG path string. Mutually exclusive with `points`.
pointsNoPolyline points as [[x,y], ...]. Compiled internally to "M x0 y0 L x1 y1 ...". Mutually exclusive with `data`.
windingRuleNoPath fill winding rule (default: NONZERO).
strokeNoStroke color — hex, gradient string, or qualified bare-name token.
strokeWeightNoStroke weight in px (default: 1).
strokeAlignNoStroke alignment relative to the path (default: center).
fillNoFill — hex / gradient / variable / "transparent" (default: "transparent").
Behavior4/5

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

No annotations are provided, so the description bears full burden. It discloses default fill transparency, mutual exclusivity of points/data, and references to stroke/fill formats from other tools. However, it does not discuss side effects, authorization needs, or potential errors, which would enhance transparency.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Very concise: purpose sentence, examples, path input details, stroke/fill, and when-not-to-use. Each section is useful and well-organized without redundancy.

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

Completeness5/5

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

For a tool with 13 parameters, no output schema, and no annotations, the description covers essential behavior: path input methods, defaults, stroke/fill format references, and usage guidance. Examples and prohibitions make it complete for an AI agent to invoke correctly.

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

Parameters5/5

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

Schema description coverage is 100%, but the description adds significant value by explaining use cases, the two exclusive path input methods, default values, and stroke/fill formats with examples. It greatly enriches the schema information.

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

Purpose5/5

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

The description explicitly states 'Create a vector node from SVG path data or a list of points' and provides specific use cases like chart lines and custom shapes. It also distinguishes from sibling tools by listing when not to use (standard shapes use jsx, existing vectors use edit/set_stroke).

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

Usage Guidelines5/5

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

Clear when-to-use and when-not-to-use sections with explicit alternatives. Examples demonstrate typical usage, and the description explains the relationship between 'points' and 'data'. It provides practical guidance for an AI agent.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/musepy/genable'

If you have feedback or need assistance with the MCP directory API, please join our Discord server