Skip to main content
Glama

QuassLabs API

convert_diagram

Make Mermaid diagrams portable. Takes HTML containing blocks (or a raw Mermaid source) and returns the same document with every diagram pre-rendered to inline SVG and the Mermaid CDN runtime stripped. A CDN-backed diagram only renders if the reader can fetch and run the runtime; inline SVG needs neither, so the output survives offline readers, email clients, Notion/Confluence (which strip ), and PDF export. Rendering happens on our infrastructure; diagram content is not sent to any third party.

Input Schema

NameRequiredDescriptionDefault
htmlNoHTML document or fragment containing <div class="mermaid"> blocks. Mutually exclusive with mermaid_source.
themeNoMermaid theme. Default "default".
backgroundNo"transparent" (default), "white", or a hex color.
output_formatNoDefault "html". "svg" returns the raw inline SVG and requires mermaid_source.
mermaid_sourceNoA single raw Mermaid diagram source. Mutually exclusive with html.
inject_lightboxNoAdd click-to-enlarge overlay CSS+JS for small-text diagrams. Default false.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose meaningful traits: rendering occurs on the provider's infrastructure, content is not sent to third parties, and inject_lightbox injects CSS+JS. It does not cover failure behavior for malformed Mermaid, size or rate limits, or whether output is deterministic — gaps that matter for a transformation tool with zero annotation coverage.

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 a one-line purpose, then input/output contract, then the rationale, then a privacy note — a sensible order. The middle sentence ('A CDN-backed diagram only renders if...inline SVG needs neither') is somewhat redundant with the first, costing a little density.

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?

No output schema exists, so the description must explain return values, and it does: the same document with inline SVG, or raw SVG when output_format=svg. Privacy handling is covered. Missing is any statement of behavior on invalid Mermaid input or partial-failure handling, which an agent would want before calling.

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%, including mutual exclusivity between html and mermaid_source and the svg-requires-mermaid_source constraint, so the schema does the heavy lifting. The description adds only indirect color via the portability framing (why inline SVG) and nothing about theme, background, or the lightbox semantics beyond what the schema states. Baseline 3 applies.

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 transformation: takes HTML with <div class="mermaid"> blocks or raw Mermaid source and returns the same document with diagrams pre-rendered to inline SVG and the CDN runtime stripped. The verb+resource+output are unambiguous. It does not, however, distinguish itself from diagram-adjacent siblings like describe_diagram or diagram_contrast, so it stops short of 5.

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 concrete use contexts — offline readers, email clients, Notion/Confluence that strip <script>, and PDF export — which is exactly the 'when to use' signal an agent needs. It stops short of explicit exclusions or naming an alternative tool to use instead.

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