Skip to main content
Glama
kerfkit-mcp

kerfkit-mcp

Official
by junixlabs

fix_laser_svg

Repairs laser-cutting SVGs into millimetre files: removes zero-length segments, maps colours to cut/score/engrave, merges double cuts, closes small gaps, and optionally applies kerf compensation.

Instructions

Apply the safe automatic repairs to an SVG and write a clean millimetre SVG: real size in mm, zero-length segments removed, colours mapped to cut (red hairline) / score (blue) / engrave (black fill), fill-only shapes turned into cut outlines when unambiguous, double cuts merged, small gaps closed. Optional kerf compensation. Never changes bridges, holes or slot widths.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "fix_laser_svg"
  }
}

Input Schema

NameRequiredDescriptionDefault
svgNoSVG text, instead of a path.
pathNoPath to a local .svg or .dxf file.
kerf_mmNoIf > 0, offset cut outlines by kerf/2 so parts come out at drawn size.
colour_mapNoOverride the layer guess per style key, e.g. {"stroke:#e8251b": "cut"}. Layers: cut, score, engrave, remove, keep.
gap_max_mmNoClose open ends up to this gap (default 0.2).
output_pathNoWhere to write the resulting SVG. If omitted, the SVG text is returned in the result.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does substantial work: it discloses exact mutations('zero-length segments removed', 'double cuts merged', 'fill-only shapes turned into cut outlines when unambiguous'), and critically the non-mutations ('Never changes bridges, holes or slot widths'). It also signals safety scoping via 'safe automatic repairs' and 'when unambiguous'. Gaps remain: overwrite behaviour on output_path, whether the operation is idempotent, and what the result reports are unspecified.

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 action before the enumeration of repairs, and the safety constraint is deliberately placed last. Dense but each listed transformation corresponds to real behaviour rather than filler; minor cost is that the middle clause is a long comma-separated run.

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 six-parameter mutation tool with no output schema and no annotations, the definition covers what changes, what is protected, and how the output is delivered (written to output_path or returned as text, per schema). Missing pieces — whether an existing output file is overwritten and whether the call reports which repairs were applied — are not disqualifying but leave a small gap for a write-producing tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all six parameters including kerf_mm, colour_map, and gap_max_mm defaults. The description reinforces meaning — colour mapping to cut/score/engrave, optional kerf compensation, gap closing — which helps an agent understand intent, but it adds no syntax, units, or edge-case detail beyond the schema text. Baseline 3 applies when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('apply the safe automatic repairs to an SVG and write a clean millimetre SVG') and then enumerates the concrete transformations (unit normalisation, zero-length removal, colour-to-operation mapping, fill-to-outline, double-cut merge, gap closure). An agent can immediately tell this is the normalise/repair step rather than a checker or gauge maker. It stops short of naming a sibling such as check_laser_file, so it is clear but not fully differentiated.

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

Usage Guidelines3/5

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

No explicit when-to-use or when-not-to-use guidance, and no named alternative among check_laser_file, refit_slots, or kerf_from_test. The phrase 'safe automatic repairs' and the closing constraint 'Never changes bridges, holes or slot widths' imply this is the pre-cut cleanup pass, but the ordering relative to the check and slot tools is left to inference.

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