Skip to content

API Reference parrot_tools.mermaid_diagram

github-actions[bot] edited this page Dec 2, 2026 · 4 revisions

parrot_tools.mermaid_diagram

View source

MermaidDiagramTool — render Mermaid source as an inline A2UI MermaidDiagram surface (FEAT-753).

Reachable via the legacy path too (parrot.tools meta_path finder): from parrot.tools.mermaid_diagram import MermaidDiagramTool.

Class MermaidDiagramArgs

Arguments for rendering a Mermaid diagram as an inline A2UI surface.

Attributes:

Attribute Type Description
source str
title str | None
caption str | None
theme str | None
accessible_description str | None

Class MermaidDiagramTool

Render Mermaid source as an inline A2UI MermaidDiagram surface.

Use it when the answer is best shown as a diagram (sequence, class, ER, state, flowchart, gantt, pie, mindmap, gitGraph, C4, …). The source is validated (size cap, no init directives, no click/javascript statements) and returned as an A2UI envelope the chat UI renders inline; text-only channels show the source. The bot lifts the envelope only when no interactive/infographic envelope was produced in the same turn — do not call it alongside an infographic render.

Architecture

Clients

Bots & Agents

Memory

Knowledge

Tools & Toolkits

Flows

Experts

Skills

Stores & Loaders

MCP & A2A

Server & APIs

Integrations

Outputs & A2UI

Prompts

Security

Operations

Migration

SDD Tooling

LLM Wiki

Deployment

Decisions

API Reference

Clone this wiki locally