{"uid":"cap_XN7tvz41NQNAMiIDYKrMC","slug":"x402-gateway-mermaid-diagram-renderer-d87495ce","name":"x402-gateway Mermaid Diagram Renderer","description":"x402-gateway tool: mermaid — Render a Mermaid diagram to an image (PNG or SVG). Returns a base64-encoded image (MCP content type image). Options: format (png|svg), theme (default|dark|forest|neutral), scale (1-4, PNG only).","url":"https://x402.freeq.one/tools/mermaid","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"code":{"type":"string","description":"Mermaid diagram source code, e.g. 'graph TD; A-->B'. Max 50000 chars."},"scale":{"type":"number","description":"Raster scale 1-4, PNG only (default 2)."},"theme":{"enum":["default","dark","forest","neutral"],"type":"string","description":"Mermaid theme (default 'default')."},"format":{"enum":["png","svg"],"type":"string","description":"Output format (default png). SVG returns vector text."}}},"responseSchema":{"type":"json","example":{"result":{}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_U6HVBdTP4hdtJZsPHjGbr","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Renders a Mermaid diagram definition string into a PNG or SVG image, returning a base64-encoded image via MCP content type.","exampleAgentPrompt":"Take this Mermaid flowchart definition and render it as a PNG using the dark theme at 2x scale: `graph TD; A[Start] --> B{Decision}; B -->|Yes| C[Action]; B -->|No| D[End]`","exampleUseCases":[{"title":"Architecture diagram for documentation","prompt":"I have a Mermaid sequence diagram showing our microservices communication — can you render it as a high-resolution PNG at 3x scale with the default theme so I can embed it in our README?"},{"title":"Dark-theme flowchart for presentation","prompt":"Turn this Mermaid flowchart into an SVG using the dark theme so I can drop it into my slide deck: `graph LR; User --> API --> DB`"},{"title":"ER diagram export for stakeholders","prompt":"Render this Mermaid ER diagram as a PNG with the forest theme and 2x scale so it looks sharp when I share it with the team."}],"resultDescription":"A base64-encoded image (PNG or SVG) returned as MCP content type image, ready to be decoded and displayed or saved. PNG supports scale factors 1–4 for higher resolution output; SVG is vector and resolution-independent.","failureModes":["Invalid Mermaid syntax causes render failure or error response","Unsupported format or theme value returns validation error","Scale value outside 1–4 range for PNG causes rejection","Scale parameter ignored or rejected for SVG format","Network timeout if diagram is very complex","Payment failure (402) if USDC balance is insufficient"],"whenToPreferThis":"Choose this endpoint when you need to convert Mermaid diagram syntax into an actual image (PNG or SVG) programmatically within an agent workflow, especially when you want theme control and resolution scaling. Prefer it over client-side rendering when a server-rendered image artifact is needed (e.g. for embedding in documents, emails, or reports).","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:39:47.200Z","isFirstParty":false}