Skip to main content
Glama

Create use reference

create_use

Create a use element that references an existing SVG object, enabling reuse where edits to the original propagate to all instances.

Instructions

Create a <use href="#href_id"> referencing an existing same-document object.

When to use: instancing / cloning an existing element so edits to the original propagate. To deep-COPY (independent) use duplicate_object; to grid-repeat use tile.

Key params: href_id MUST name an existing element (safe-id charset, required to exist); external / javascript: / url(...) references are rejected — only a same-document #id. Into parent_id (must exist) or the document default parent. Placement (translate-scaling trap): <use> applies x / y as a translation BEFORE its transform, so scale(2) + x="10" shifts by 20 — prefer EITHER x / y alone OR fold the translation into transform (e.g. translate(10,0) scale(2)); do not mix x / y with a scaling transform.

Return shape: CreateResultobject_id is the new <use> id, bbox=None, plus the pipeline fields (operation_id, snapshot_id, changed, preview).

Example: create_use(doc_id, "logo", x=200, y=0)

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
xNo
yNo
doc_idYes
href_idYes
object_idNo
parent_idNo
transformNo

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?

The description adds substantial behavioral context beyond annotations. It details the return shape (CreateResult with fields), the translate-scaling trap (x/y as translation before transform, warning not to mix with scaling transform), validation (only same-document #id, rejected external/javascript/url), and risk class (medium, reversible write-new). Annotations already indicate write and non-destructive, which is consistent.

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, starting with purpose, then usage guidelines, key params with warnings, return shape, example, and safety advice. It is front-loaded with essential information. While it is relatively long, every sentence adds value, and the organization makes it easy to parse. A slight trim could improve conciseness, but it remains highly effective.

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 7 parameters, complex SVG behavior, and an output schema, the description is exceptionally complete. It covers the placement trap, validation rules, return shape, and provides a concrete example. The advice to use render_preview and restore_snapshot further ensures safe usage. All aspects necessary for correct invocation are addressed.

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?

Given 0% schema description coverage, the description comprehensively explains key parameters: href_id must name existing element, parent_id must exist or default, x/y translation behavior, and transform usage with the scaling trap. It also notes default parent, object_id optional, and includes an example. This fully compensates for the lack of schema descriptions.

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 clearly states 'Create a `<use href="#href_id">` referencing an existing same-document object' and distinguishes from siblings by specifying alternatives for deep-copy (duplicate_object) and grid-repeat (tile). The verb and resource are specific, and the tool's unique role in SVG instancing is well-defined.

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?

Explicit 'When to use' context is provided: 'instancing / cloning an existing element so edits to the original propagate.' It also gives clear when-not-to-use examples: 'To deep-COPY (independent) use duplicate_object; to grid-repeat use tile.' Additionally, it advises to render and inspect before trusting, and mentions restore_snapshot for reversion.

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