Skip to main content
Glama

Create path

create_path

Create a path element from an SVG d data string, with optional fill and stroke styling. Use this tool for freeform, bezier, or curve geometry that cannot be represented by basic shapes.

Instructions

Create a <path> with the validated d data string.

When to use: freeform / bezier / curve geometry from a d string. For simple primitives prefer create_rect / create_circle / create_polygon; to edit an existing path's geometry use the paths tools (simplify_path, combine_paths, ...).

Key params: d validated against a strict charset (digits, whitespace, ,, ., sign, exponent, SVG path command letters only) and length-bounded; geometry is NOT fully parsed; into parent_id (must exist) or the document default parent. Optional fill / stroke / stroke_width paint it in this call (validated like set_fill / set_stroke; default None = unpainted).

Return shape: CreateResultobject_id (new id), bbox=None (paths are not analytically measured), plus the pipeline fields (operation_id, snapshot_id, changed, preview).

Example: create_path(doc_id, "M0 0 L100 0 L50 80 Z", fill="#222")

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

TableJSON Schema
NameRequiredDescriptionDefault
dYes
fillNo
doc_idYes
strokeNo
object_idNo
parent_idNo
stroke_widthNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
bboxNo
doc_idYes
changedYes
summaryNo
object_idYes
snapshot_idYes
operation_idYes
preview_afterNo
preview_beforeNo
Behavior5/5

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

Discloses multiple behavioral details beyond annotations: d validation (strict charset, length-bounded, not fully parsed), optional paint parameters validated like set_fill/set_stroke, default unpainted, parent_id requirement, return shape with bbox=None, and risk class 'medium reversible write-new'. The annotations only indicate readOnlyHint=false and destructiveHint=false, so the description carries the full burden and does so thoroughly.

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?

The description is well-structured with clear sections (When to use, Key params, Return shape, Example, Render advice, Risk class). It is slightly lengthy but every section adds value. Front-loading the main purpose helps quick understanding.

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?

The description covers all necessary aspects: purpose, usage conditions, parameter behavior, return shape with example, risk assessment, and integration with sibling and preview tools. Given the tool's complexity and the presence of an output schema (mentioned), the description is highly complete.

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

Parameters4/5

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

With 0% schema description coverage, the description explains most key parameters: d (validation details), parent_id (must exist or default), fill/stroke/stroke_width (optional, validated, default None). However, doc_id and object_id are not explicitly described, leaving a minor gap. Overall, it adds significant meaning beyond the raw schema.

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?

Clearly states the verb 'create' and resource 'path', with explicit differentiation from sibling tools like create_rect, create_circle, and editing paths via simplify_path. The description includes specific when-to-use guidance, making the purpose unmistakable.

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?

Provides explicit when to use (freeform/bezier/curve geometry) and when not (prefer primitives for simple shapes; use paths tools for edits). Includes a recommendation to render and inspect via render_preview before trusting the edit, and mentions restore_snapshot for reversion. This offers clear context for safe and appropriate invocation.

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/jjjsood/inkscape-mcp-server'

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