Skip to main content
Glama
code-and-crypto

inkscape-mcp-server

svg_optimize

Optimize SVG files by pruning unreferenced defs, stripping Inkscape/Sodipodi/RDF metadata, removing empty groups, rounding coordinates, and minifying to cut file size.

Instructions

REAL SVG optimisation: prune unreferenced defs, strip inkscape:/sodipodi:/RDF cruft, drop empty groups, round coordinates, remove default style properties, minify. Done in Python because Inkscape's own vacuum-defs is a VERIFIED silent no-op headlessly and document-cleanup is window-scoped. Reports bytes saved.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
minifyNoCollapse whitespace and drop comments.
keep_idsNoIds that must never be pruned.
precisionNoDecimal places to round coordinates to.
input_pathNoSource file to read.
prune_defsNoRemove unreferenced entries from <defs>.
output_pathNoFile to write. Overwritten if it exists.
strip_metadataNoRemove inkscape:, sodipodi: and RDF markup.
strip_unused_idsNoDrop ids nothing references. Off by default: ids may be referenced from outside the file.
drop_empty_groupsNoRemove containers that paint nothing.
strip_default_styleNoDrop style properties that restate the SVG default.
Behavior4/5

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

With no annotations, the description carries the behavioral burden: it states the destructive transformations (prune, strip, drop, remove, minify) and adds that the tool reports bytes saved. It does not mention permissions or failure modes, but the schema's output_path note covers overwrites and the transformation list is explicit.

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 tight: the first sentence front-loads the operation list and the second explains the implementation choice plus the output summary. The 'VERIFIED' and 'REAL' emphasis is slightly colorful but conveys reliability context without bloat.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 10-parameter tool with no output schema and no annotations, the description provides a solid conceptual model and mentions the key output behavior of reporting bytes saved. It could state defaults or required input/output paths more explicitly, but the schema already documents each parameter and the description covers the high-level behavior.

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?

Schema coverage is 100%, so the baseline is 3; the description adds value by mapping its listed operations to the parameter families (minify, precision, strip_metadata, drop_empty_groups, strip_default_style, prune_defs). It does not describe every parameter such as keep_ids and strip_unused_ids, which remain schema-only, so it does not earn a 5.

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 names the exact operation (optimize) on a specific resource (SVG) and enumerates concrete transformations: pruning unreferenced defs, stripping metadata, dropping empty groups, rounding coordinates, removing default style, and minifying. This scope makes it easy to distinguish from sibling tools like svg_analyze and svg_validate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It gives clear context by explaining why the tool exists (reliable headless SVG optimization) and explicitly warns against Inkscape's vacuum-defs as a verified silent no-op with window-scoped cleanup. It does not name sibling alternatives or state an explicit 'use when...' rule, so it falls just short of perfect usage routing.

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/code-and-crypto/inkscape-mcp-server'

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