Tools reference

Every tool the Penna connector gives your AI app, with its parameters, exactly as the AI sees them.

These are the tools your AI app gets when you connect it. The in-app assistant uses the same diagram tools, without diagram_id, because it always works on the diagram you have open. Select a tool to see its full description and parameters.

ToolWhat it doesRead-only
get_diagramRead diagramYes
write_diagramReplace diagramNo
edit_diagramEdit diagramNo
read_commentsRead commentsYes
lookup_guidanceLook up BPMN guidance, Look up sequence diagram guidance, Look up ER diagram guidanceYes
list_diagramsList diagramsYes
open_diagramShow diagram in the appNo
create_diagramCreate diagramNo
read_contextRead business contextYes
save_learningSave learningNo
show_diagramShow diagramYes

The connector also has load_diagram_card, edit_from_card, which only the diagram card calls, to load its picture and make the changes you make in it. Chats that show the card hide them from the AI.

Tools

Operations

Each entry in edit_diagram's operations is one of these, picked by its op field. The batch is atomic: if one operation fails, none apply.

Server instructions

The connector also sends these instructions when an AI app connects. Some clients shorten or ignore them, which is why the tools carry what they need in their own descriptions.

Penna: tools to draft and edit BPMN 2.0 process diagrams saved in the user's account. The app lays out and wires diagrams automatically; you change the structure and spacing. If the app is open, it updates live.

Workflow
1. Pick the diagram. list_diagrams shows ids and which one is open in the app ("this diagram" usually means that one); create_diagram makes a new one.
2. Before your first write, call lookup_guidance with topic "flowmark" for the markup syntax. Look up "modeling-style" or a domain topic when it fits the process.
3. Draft with write_diagram, happy path first. Change an existing diagram, fixes included, with edit_diagram so element ids stay stable. Call get_diagram first if the user may have edited it by hand; it also counts their comments, which read_comments reads.
4. Every change returns checks. Fix every error, and every warning that is a real problem, before you finish. A fix keeps everything else as it is. When it depends on what the user meant, such as a step connected to nothing, ask the user what it is for before you connect or remove it; don't guess.
5. Finish with a short summary of what you built and the assumptions you made, with the link to the diagram that ends each result. Don't paste the markup back.

Modeling rules: activities are verb + object, events are states, decision gateways are questions and their flows are answers. Explicit start events and distinct, named end events. A gateway for every split and merge. Lanes for roles; outside parties as pools with messages. Deadlines and failures as boundary events on the activity. Specific task types. 5-20 activities per diagram.

Sequence diagrams: look up "sequence-code" before your first write. Calls are ->, replies -->, async ->>; alt/else, opt, loop and par wrap messages and close with end. Use actor and database for people and data stores; aim for 3-8 participants.

ER diagrams: look up "schema-code" (DBML) before your first write. A primary key on every table, ref: > on each foreign key; many-to-many is a junction table.

On this page