Skip to main content
Glama

Create polyline

create_polyline

Draw an open polyline by specifying a series of (x, y) coordinate pairs.

Instructions

Create an open <polyline> from points (≥ 1 (x, y) pairs).

When to use: a connected open run of segments. For a CLOSED shape use create_polygon; for a single segment use create_line; for curves use create_path.

Key params: points ≥ 1 (x, y) pairs; inserted into parent_id (must exist) or the document default parent; object_id to pin the id. 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), analytic bbox (extent of the points), plus the pipeline fields (operation_id, snapshot_id, changed, preview).

Example: create_polyline(doc_id, [(0, 0), (50, 20), (100, 0)], stroke="blue")

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
fillNo
doc_idYes
pointsYes
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?

Annotations indicate the tool is not read-only and not destructive. The description adds valuable behavioral context: it creates a new object, inserts into a parent, optionally paints, and notes the risk class as 'medium (reversible write-new).' It also advises rendering a preview before relying on the edit, which goes beyond annotations.

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?

The description is well-structured and concise: first line states purpose, then usage guidance, key parameters, return shape, an example, and finally safety advice. Every sentence adds value 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?

Given the tool's complexity (7 params, output schema present), the description covers all essential aspects: purpose, usage context, parameter details, return format, concrete example, and risk mitigation. It feels fully complete for an agent to use correctly.

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?

The input schema has 7 parameters with 0% description coverage. The description compensates by explaining key parameters: points must be ≥1 (x,y) pairs, parent_id must exist or default to document, object_id pins the id, and fill/stroke/stroke_width are optional. However, doc_id is not explained beyond being required. Overall, it adds significant meaning over 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?

The description states exactly what the tool does: 'Create an open <polyline> from points (≥ 1 (x, y) pairs).' It clearly names the resource and action, and differentiates from siblings by specifying when to use create_polygon, create_line, or create_path instead.

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?

The description provides explicit when-to-use guidance: 'a connected open run of segments.' It also gives specific alternatives for closed shapes, single segments, and curves, making it easy for the agent to choose the correct tool.

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