Skip to main content
Glama

Set opacity

set_opacity
Idempotent

Adjust the overall transparency of SVG objects by setting element-level opacity, affecting both fill and stroke simultaneously. Use opacity values between 0 and 1 for full control.

Instructions

Set the element-level opacity of one or more objects.

When to use: making whole objects more/less transparent. For fill-only or stroke-only opacity use set_fill / set_stroke with their opacity argument instead.

Key params: opacity must be in [0, 1] (this is the element opacity, affecting fill AND stroke together).

Return shape: EditResultoperation_id, snapshot_id, changed, before/after preview; the edit lands on the working copy only (reversible).

Example: set_opacity(doc_id, ["overlay"], 0.5)

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
doc_idYes
opacityYes
object_idsYes

Output Schema

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

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

Beyond annotations (readOnlyHint=false, destructiveHint=false, idempotentHint=true), description explains the edit is reversible, lands on working copy, and risk class is medium. No contradiction with annotations; adds useful behavioral details.

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?

Well-structured with sections (When to use, Key params, Return shape, Example, etc.), front-loaded with purpose. Slightly lengthy but every sentence adds value.

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?

Comprehensive coverage: input, behavior, output (EditResult described), safety guidelines, and risk. Given output schema exists, description is complete and leaves no gaps.

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 coverage, description compensates by explaining opacity range [0,1], its effect on fill+stroke, and provides an example. Adds meaning beyond 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 clearly states the tool sets element-level opacity of objects, distinguishing it from fill/stroke opacity. It uses specific verb+resource and differentiates from siblings set_fill and set_stroke, making the purpose unambiguous.

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?

Explicitly states when to use (making whole objects transparent) and when to use alternatives (set_fill/set_stroke for fill/stroke-only opacity). Also advises to render and check before trusting, providing clear context.

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