Skip to main content
Glama
declanbx
by declanbx

python

Run complex scripts to customize Inkscape documents. Use code to programmatically control elements, styles, and geometry directly on the live SVG canvas.

Instructions

Run Python (inkex) against the live document in one undoable step — anything the other tools cannot express. In scope: svg (root element), by_id(id), selected (ids), inkex, etree, Transform, frames (frames.content(el) maps an element's coordinates to page px), to_px('3mm'), qname('inkscape:label'), unique_id(base), parse_style/style_str. print() output and result = … come back. readonly=True skips the document reload (fast inspection). timeout_s: give up waiting after this long (the result is then UNCERTAIN COMPLETION: the code may still finish and apply).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYes
readonlyNo
timeout_sNo
expected_revisionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

With no annotations, the description carries the whole burden and does so well: it declares the operation is one undoable step (mutation semantics), that readonly=True skips the document reload, and that a timeout yields UNCERTAIN COMPLETION with the code possibly still applying. It also tells the agent how results are captured (print() and `result = …`).

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?

Front-loaded with the core purpose, then dense but purposeful clauses on scope, return capture, readonly, and timeout. The long list of available names is information-dense rather than padding, though the run-on structure makes it slightly harder to scan.

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?

An output schema exists, so return values needn't be detailed, and the description still usefully notes that print() and `result =` come back. Combined with mutation, readonly, and timeout behavior it is nearly complete for a 4-param tool — only expected_revision is left unexplained.

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 0%, so the description must compensate, and it explains readonly (fast inspection, no reload) and timeout_s (give-up point with uncertain outcome) plus the code namespace available (svg, by_id, frames, to_px, qname, etc.). It never mentions expected_revision, the fourth parameter, leaving the concurrency-control argument entirely undocumented.

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?

States a specific verb+resource (run Python/inkex against the live document) and immediately scopes it as the escape hatch — 'anything the other tools cannot express'. That single clause separates it from every sibling (move, style, text, align, etc.) without the agent opening another schema.

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?

Gives clear selection context: use it when the specialized tools cannot express the operation, and use readonly=True for fast inspection. It does not name specific alternatives to prefer or state hard exclusions, so it falls short of a full when/when-not/alternatives rubric.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.