Skip to main content
Glama

svg-geometry

SVG layout check: clipping, overlaps and empty shapes from supplied geometry — Checks up to 200 SVG shapes you describe (rect, circle, ellipse, line, polygon, polyline, text, or a path's bounding box) against the viewBox and viewport the way an SVG renderer would: finds shapes clipped or entirely outside the drawn region, shapes that render nothing (zero or negative size, unstroked line), partial overlaps between shapes, and a zero, negative or malformed viewBox, for agents

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "shapes": "<shapes>"
    },
    "name": "svg-geometry"
  }
}

Input Schema

NameRequiredDescriptionDefault
widthNoViewport width in px (the svg width attribute).
checksNoSubset of clip, empty, overlap; default all. Overlap reports partial overlaps only; a shape fully inside another (a label on a card) is listed as nested and never fails.
heightNoViewport height in px.
shapesYesShapes in user coordinates (no transform). rect: x,y,width,height. circle: cx,cy,r. ellipse: cx,cy,rx,ry. line: x1,y1,x2,y2,strokeWidth. polygon/polyline: points. text: x,y,text,fontSize,textAnchor. bbox: bbox [minX,minY,maxX,maxY] for a path you measured yourself.
viewBoxNoThe viewBox attribute value, e.g. "0 0 800 600".
preserveAspectRatioNoDefault xMidYMid meet.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

No annotations are supplied, so the description carries the full burden, and it does meaningful work: it discloses the input cap, that it emulates SVG renderer semantics, that overlap reporting is partial-only and that nested shapes are listed but never fail, and that viewBox alone can be zero/negative/malformed. It does not say whether the call is purely non-mutating or what the findings structure looks like, but the behaviorally important expectations are set.

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?

The core purpose and check list are front-loaded in the opening clause, which is good, but the body is a single em-dash-joined run-on that is harder to scan than a short bulleted list would be. The description also ends with a dangling fragment ('for agents ') that reads as truncated text and adds no information.

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, fully-schema-described tool with no output schema, the description covers what inputs it expects (user coordinates, no transforms, up to 200 shapes) and what categories of findings it produces, so an agent can decide and call correctly. The main residual gap is that with no output schema, the concrete shape of the returned findings (severity, per-shape diagnostics, pass/fail summary) is left unspecified.

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 description coverage is 100%, so the schema already documents width/height, viewBox, preserveAspectRatio, checks, and each shape sub-field. The description adds only mild reinforcement — restating accepted shape types and the 200-shape limit — and contributes no new coordinate conventions, defaults, or interaction rules beyond what the schema properties already say. Baseline 3 is appropriate.

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 opens with a specific verb+resource ('SVG layout check: clipping, overlaps and empty shapes from supplied geometry') and then enumerates the exact shape types accepted and the exact defect classes detected (clipped/outside, zero or negative size, unstroked line, partial overlap, malformed viewBox). An agent can tell this is a static geometry validator rather than a renderer or file parser without consulting the schema, and no sibling in the listed catalog overlaps this function.

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?

Use cases are strongly implied by the enumerated checks ('the way an SVG renderer would'), and the description notes the 200-shape ceiling and the nested-vs-partial overlap rule, which effectively tells the agent when a result is and isn't a failure. However, it never states when to reach for this tool versus an alternative, or any preconditions (e.g. coordinates must be pre-transform, which is only stated in the schema).

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources