Skip to content
Connect an agent
Tool reference

Tool reference

The operations an AI agent can call. Each tool has a name, a description written for a model, typed arguments, and a typed result, and its own page. The same manifest backs the HTTP API and the MCP (Model Context Protocol) server, so a tool behaves the same everywhere. Workflows come first: each does the work of several single tools and returns one combined answer.

TL;DR

QuestionAnswer
Which tool do I call first?get_diagram_syntax, once, to read the language.
What is a workflow?A tool that performs several engine operations and returns one combined answer, so an agent spends one turn where it would spend several. It publishes its steps and the most operations one call can perform.
What is the write loop?Write source and call draw_diagram. If it returns errors, fix every one using its line, column, and hint and call again; nothing is drawn until the source is valid. Then use the pictures it returns.
How do I put diagrams in a document?Call sync_markdown with the document and its path. It returns the rewritten document and the SVG files to write. Set convertMermaid to replace Mermaid fences first.
When do I use a single tool?For one fine-grained step: validate_diagram to check, outline_diagram to describe, render_diagram to draw one theme, search_icons for one query.
Do any tools change anything?Not the tools on this page: each is read-only, idempotent, and closed-world, and none saves a file. Workflows return files as data for the caller to write. The hosted server adds three tools that work on your account: publish_diagram stores a diagram, list_diagrams reads your library, and delete_diagram removes a diagram you name. They are described in the MCP server guide.
What happens on bad source?A workflow returns the errors as data. validate_diagram returns them as data too. render_diagram and outline_diagram fail with the same diagnostics.
Where do I get this as data?An MCP client reads every name, description, and JSON Schema from tools/list. The language itself comes from get_diagram_syntax, or from GET /v1/vocabulary over HTTP.

Workflows

A workflow performs several engine operations in one request. Each declares the operations it may call and the most it can perform, and a test runs every workflow with its widest input and fails if it calls an undeclared operation or passes its ceiling. An agent never has to guess: an ambiguous input comes back as candidates, and a mistake in the input comes back as data.

WorkflowOperationsMost operations per callReplaces
draw_diagramvalidate, outline, render4validate_diagram, outline_diagram and render_diagram calls
edit_diagramparse, outline, validate, render4rewriting the source by hand and the draw_diagram check
convert_mermaidconvertMermaid, validate, outline, render5convert, validate_diagram, outline_diagram and render_diagram calls
import_sourceimportSource, validate, outline26validate_diagram and outline_diagram
map_iconssearchIcons80up to 40 search_icons calls
sync_markdownconvertMermaidFences, renderPair31convert, validate, render and sync steps for every fence in a document
suggest_diagramparse3reading every kind in get_diagram_syntax to choose one
plan_document_diagramsparse12reading the document section by section and choosing a kind for each
find_patternfindPatterns1searching the documentation for an example to copy
get_patternfillPattern1searching for an example and copying it by hand
draw_from_patternfillPattern, validate, outline, render5get_pattern, validate_diagram, outline_diagram and render_diagram calls

Single tools

Each single tool does one thing. Use one when a workflow does more than you need.

ToolTitleWhat it does
read_diagramRead diagramRead the source of an existing Plotwork SVG so you can edit the diagram
compare_diagramsCompare diagramsCompare two versions of a diagram by meaning, for a pull request review
get_diagram_syntaxGet diagram syntaxRead the diagram language as data
validate_diagramValidate diagramCheck diagram source without drawing it: every error in one pass, each with line, column, and a fix hint, plus quality warnings
render_diagramRender diagramRender valid source to a self-contained, accessible SVG in the light or dark theme, with its pixel size and quality warnings
outline_diagramOutline diagramDescribe valid diagram source as plain text: participants, steps, tables, and connections in reading order, to check the diagram says what you meant or to use as alt text
search_iconsSearch iconsFind bundled icon names by keyword, idea, product, or abbreviation ("postgres", "token exchange", "s3", "cosmos db")

Bounds

Nothing a workflow does per item is unbounded. A bound that is reached is reported in the result; nothing is cut silently. Each tool page lists the bounds that apply to it.

BoundWorkflowValueWhat it limits
maxIconNamesmap_icons40Names in one call.
maxIconNameLengthmap_icons80Characters in one name.
maxIconAlternativesmap_icons3Other icons listed beside a chosen icon.
maxIconCandidatesmap_icons4Icons listed for a name that could mean several.
maxSummaryOutlineLinesdraw_diagram40Outline lines in a summary; detail "full" returns all of them.
maxMarkdownLengthsync_markdown10000000Characters in the document.
maxDiagramssync_markdown30Diagram fences, plus mermaid fences when converting, handled in one call; the rest are left alone and reported.
maxOutputBytessync_markdown2000000Bytes in the returned document and files together; fences that would pass it are not drawn and are reported.
maxPatternQueryLengthfind_pattern200Characters in the query.
maxPatternTagsfind_pattern5Tags a search can require.
maxPatternResultsfind_pattern5Matches in one answer.
maxPatternSlotsget_pattern40Slot values in one call; draw_from_pattern takes the same.
maxPathLengthsync_markdown300Characters in the document path or the assets directory.
maxPrefixLengthsync_markdown32Characters in the file name prefix.
maxRequestLengthsuggest_diagram1000Characters in the request.
maxSuggestDataLengthsuggest_diagram20000Characters in the pasted data.
maxSuggestionssuggest_diagram3Kinds suggested in one answer.
maxPlanDocumentLengthplan_document_diagrams10000000Characters in the document.
maxPlanSectionsplan_document_diagrams200Sections read; a document with more says so in caps.
maxPlanSuggestionsplan_document_diagrams12Sections suggested in one answer, the strongest first; the rest are counted in caps.
maxStarterItemssuggest_diagram8Items, rows, or columns a starter takes from the text; plan_document_diagrams takes the same.
maxEditOperationsedit_diagram50Operations in one call.
maxImportLengthimport_source10000000Characters an import reads, not counting white space or lines that are only a comment. A longer text is answered with I102.
maxImportLocalLengthimport_source100000000Characters of text in one call on the local server, which runs on your own machine. A guard on memory, not a cap a real project meets.
maxImportTextLengthimport_source10485760Characters of text in one hosted call, comments and white space included, all files together.
maxImportFilesimport_source200Files in one hosted call.
maxImportLocalFilesimport_source20000Files in one call on the local server.
maxImportPartsimport_source24Diagrams one import is split into when the file is too big for one picture; each is validated.
maxImportNodesimport_source40Boxes in an imported flow; the rest are left out with an I200 diagnostic.
maxImportTablesimport_source20Tables in an imported schema.
maxImportRowsimport_source20Rows of an imported matrix: endpoints, or rows of a table.
maxImportColumnsimport_source8Columns of an imported matrix: roles, scopes, or schemes.
maxImportPointsimport_source60Places, slices, flows, or tiles in an imported chart.
maxImportSeriesimport_source6Series in an imported XY chart.
maxImportEntriesimport_source60Rows of an imported tree; a folder past it ends with an omitted line.
maxImportCommitsimport_source40Commits of an imported git graph, the newest kept, and events of an imported timeline.
maxImportMessagesimport_source30Messages of an imported sequence.
maxEditTextLengthedit_diagram2000Characters in one field of an operation, such as a statement, a find, or a replacement.
maxCompareChangescompare_diagrams200Changes listed in one answer; counts and the summary cover every change.
maxSyncPageSizesync_markdown30Pictures in one page of files, with page and pageSize.

See also

DocWhy
API referenceThe same operations over HTTP, one page for each endpoint
Language referenceWhat the diagram source may contain
Writing diagrams with an agentThe loop in practice