Skip to main content
Glama

Live: apply to selection

live_apply_to_selection

Apply validated fill, stroke, opacity, or transform (move, scale, rotate) to the current selection. Requires explicit approval token for safe, reversible edits.

Instructions

Apply a validated style and/or simple transform to the current live selection.

When to use: editing the GUI selection's style/transform live. To insert markup use live_insert_svg; to edit text use live_set_selected_text; for headless edits use set_fill / move_object / etc.

Key params: reuses the headless safe-edit semantics — fill/stroke colour-validated, stroke_width a CSS length, opacity in [0, 1], transform composed from dx/dy (both required together), scale (positive), rotate (degrees); at least one input required. Semantic-only — no arbitrary code, no raw Action (ADR-003). Mutating a running user session is HIGH risk: REQUIRES an explicit approval_token (refused without one).

Return shape: LiveEditResult — a Live Operation Record with before/after canvas renders, syncable to a snapshot via live_sync_to_workspace.

Example: live_apply_to_selection(approval_token="ok", fill="#3366cc")

Risk class: high (approval-gated).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dxNo
dyNo
fillNo
scaleNo
rotateNo
strokeNo
opacityNo
stroke_widthNo
approval_tokenNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNo
summaryNo
transportNo
affected_idsNo
operation_idYes
preview_afterNo
undo_friendlyNo
preview_beforeNo
Behavior5/5

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

Description goes beyond annotations by stating the high risk of mutating a user session, the requirement for an explicit approval_token, and that it's semantic-only with no arbitrary code. This adds critical context beyond the readOnlyHint=false annotation.

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 with a clear first sentence stating purpose, followed by usage guidance, parameter details, return shape, an example, and risk classification. Every sentence adds value without fluff.

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 (9 params, high risk, mutation), the description covers all essential aspects: when to use, parameter constraints, return value (LiveEditResult with before/after renders), and risk class. The presence of an output schema is supplemented by description of the return shape.

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?

With 0% schema description coverage, the description compensates fully by explaining each parameter's semantics: color validation, CSS length for stroke_width, opacity range, transform constraints (dx/dy required together, positive scale, degrees for rotate), and the at-least-one-input requirement.

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 the tool applies a validated style/transform to the current live selection. It distinguishes from siblings by naming alternatives like live_insert_svg and live_set_selected_text.

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' section guides the agent to use this for live style/transform editing and lists sibling tools for different tasks (insert, text, headless edits).

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