Skip to main content
Glama

import_svg

Convert SVG markup or a local .svg file into a path slot body for Odoo PDF/HTML templates, returning viewBox, paths, dimensions, and warnings for dropped content.

Instructions

Turn an SVG (a logo, an illustration, a shape drawn elsewhere) into a path slot body: returns {viewBox, paths, warnings, box, keepAspect}. Pass the markup as svg, or path to a local .svg file (max 1 MB). Create the slot as {"kind": "path", "x", "y", "w": box.w, "h": box.h, "viewBox", "keepAspect", "paths"}, or pass w/h for the size you will place it at (stroke widths are in pt for that size). Text, images, filters and masks are dropped and listed in warnings.

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": "import_svg"
  }
}

Input Schema

NameRequiredDescriptionDefault
hNo
wNo
svgNo
pathNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.1

TDQS

A4.4/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 well: it discloses lossy behavior ('Text, images, filters and masks are dropped and listed in warnings'), an input size limit (max 1 MB), and a non-obvious unit rule (stroke widths are in pt for the target size). It never states whether the tool writes anything to disk or is purely a conversion, which is the main remaining ambiguity for a no-annotation tool.

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 purpose and return shape, then input options, then construction guidance, then caveats — a sensible ordering with little waste. The inline JSON snippet is dense to read in prose but earns its place by giving a concrete slot skeleton.

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?

With no annotations and no output schema, the description supplies the return-field list, limits, lossiness, and unit semantics — enough for an agent to call it and construct the slot correctly. Gaps are the interaction between `box` and explicit w/h, conflict rules between `svg` and `path`, and any failure/error behavior.

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?

Schema coverage is 0% and the four parameters are bare names (svg, path, w, h), so the description must compensate and largely does: `svg` is markup, `path` is a local .svg file limited to 1 MB, and w/h are the size the graphic will be placed at, which also determines stroke-width units. Only the behavior when both svg and path are supplied, or both omitted, goes unstated.

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 and resource pair ('Turn an SVG ... into a `path` slot body') and immediately enumerates the returned shape ({viewBox, paths, warnings, box, keepAspect}). No sibling tool touches SVG import, so an agent can select it unambiguously from the list of template/part/email tools.

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 tells the agent exactly how to supply input ('Pass the markup as `svg`, or `path` to a local .svg file') and what to do with the result (build a path slot with the listed keys, or pass w/h for the placement size). It gives constraints (max 1 MB) and exclusions (text, images, filters and masks are dropped), but never states when *not* to use it or what to do instead if the SVG contains unsupported content.

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