kbb-mcp-relay
v1.3.0MCP relay for InfoRapid KnowledgeBase Builder
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
kbb_status Connection status
Checks whether a KBB instance is connected and paired. Returns the pairing code if not paired yet, which the user must enter in the app. Call this tool first on any NOT_CONNECTED or PERMISSION_DENIED error.
kbb_run_status Status of a detached run
Reports a command started with runDetached (currently kbb_run_screenplay): whether it is still running, its result, or its error. Without runId, all remembered runs are listed. Instead of polling this tool, wait for the 'run_finished' event with kbb_wait_for_event.
| Parameter | Type | Description |
|---|---|---|
runId | string | Run ID from the detached start. Omit to list all. |
kbb_get_stats Database statistics
Overview and metrics of the current knowledge base (number of items, relations, categories). Recommended first call for orientation as it uses minimal tokens.
kbb_get_selected Current selection
Identifies what the user is currently viewing in the app. Returns the current root item and selected elements to build upon the user's active context.
kbb_search_nodes Search nodes
Full-text search across the knowledge base. Returns matching item IDs with names. Standard way to look up node IDs prior to updates or linking.
| Parameter | Type | Description |
|---|---|---|
query * | string | Search query string. |
limit | integer | Default 25. |
kbb_get_node Get node
Full data of a single node including full description, category, tags, and note. For broader overview, use kbb_get_neighborhood — this tool intentionally returns detailed content.
| Parameter | Type | Description |
|---|---|---|
itemId * | integer | Item ID. |
includeNote | boolean | Include HTML note. Default false. |
kbb_get_dates Get dates and user data
Reads the user data of one or more nodes, that is the date fields and any other values stored on them. Dates are ISO strings 'YYYY-MM-DDTHH:MM'; a shortened value such as '2026' or '2026-03' means the beginning of that period. Nodes without user data are returned with an empty object.
| Parameter | Type | Description |
|---|---|---|
itemIds * | array | Item IDs to read. |
kbb_get_userdata_schema Read user data schema
Which data fields and item types the OPEN database knows, and which type each category suggests for new items. Read this before writing user data: every database may declare its own fields in the diagram properties 'udf' and its own types in 'udt' (both writable with kbb_set_diagram), so field names cannot be guessed. 'source' says whether an entry is built into the app or declared by this database. A type lists the fields its items are offered and the entries it contributes to the timeline: 'start' alone is a point, 'start' with 'end' a bar, and 'shape' is 'milestone' for a deadline. Values s…
kbb_find_by_date Find nodes by date
Finds nodes by their date fields across the WHOLE database, not just the part currently loaded in the diagram. 'from' and 'to' form a half open range: from is included, to is not, so a month is [first of month, first of next month). With 'groupBy' the tool returns counts per year, month or day instead of the nodes themselves, which is the cheap way to see where data sits in a large database. 'filter' adds conditions on any user data field and supports and/or/not. Dates of different precision are compared as moments, so a node dated '2026-05-11' is found by a range whose bounds carry a time, an…
| Parameter | Type | Description |
|---|---|---|
descending | boolean | Sort newest first. |
field | string | Date field to search and sort by. Default 'start'. |
filter | object | Additional conditions, for example {"op":"or","c":[{"k":"status","op":"eq","v":"open"},{"k":"priority","op":"ge","v":4}]}. |
from | string | Start of the range, included. |
groupBy | string | Return counts per period instead of the nodes. |
maxResults | integer | Maximum number of nodes. Default 200. |
to | string | End of the range, excluded. |
kbb_get_neighborhood Get neighborhood
The immediate neighborhood graph surrounding a node — IDs, names, categories, and connections, without heavy images or layout internals. The standard tool to explore the graph without loading the entire database into context. Every entry under 'relations' carries its own id — that is the relationId kbb_update_relation, kbb_set_style and kbb_delete expect.
| Parameter | Type | Description |
|---|---|---|
depth | integer | Traversal depth. Default 1. |
itemId | integer | Center node ID. If omitted, the current root item is used. |
maxItems | integer | Maximum items. Default 50. |
kbb_get_categories Get categories and templates
Lists all item and relation categories/templates with their names and IDs. Styles (color, shape, icon) are not part of this listing.
| Parameter | Type | Description |
|---|---|---|
type | string | Filter templates. Default 'all'. |
kbb_get_category_items Get items in category
Items assigned to one item category (mirrors the 'Items in Category' panel). Without arguments, returns the items that have no category at all.
| Parameter | Type | Description |
|---|---|---|
categoryId | integer | ID of the item category. -1 = items without category. |
categoryName | string | Name of the item category. Resolved to its ID. |
limit | integer | Maximum items. Default 1000. |
kbb_get_attachments Get attachments
With itemId: the attachments linked to that node or connection, each with its attachmentId (the link) and recordId (the repository entry). Without itemId: the whole attachment repository including where each entry is linked. Preview images are omitted.
| Parameter | Type | Description |
|---|---|---|
isRelation | boolean | itemId denotes a connection, not a node. Default false. |
itemId | integer | Node (or connection) ID. Omit to list the repository. |
kbb_get_whiteboards Get whiteboards
Lists the whiteboard spaces (items tagged #board) of the current database and reports whether one is currently open. Use the ids with kbb_set_whiteboard_mode to switch spaces.
kbb_list_bookmarks List bookmarks
Lists the saved views of the active database with their index, name, root item, display mode, and layout.
kbb_list_databases List databases
Lists the knowledge bases of the signed-in user with their IDs, and marks the one currently open. Web application only.
kbb_get_ui_state Get UI state
Current UI state: display mode, 2D/3D layout, whiteboard mode and the open whiteboard, edit mode, the four view sliders, root item and selection, which side panels are open, and how many dialogs are up.
kbb_measure_view Measure the drawn view
Everything a screenshot would have to be looked at for, as numbers: the viewport, the bounding box of the drawn diagram in screen pixels, how many elements are fully in frame and how many are clipped, the median label height (readability — under ~60 px node text is unreadable in a 1920-wide video), how far the drawing is off centre, the current zoom, distance, layout and mode, whether a dialog is open and whether the app is still busy drawing. Use it INSTEAD of taking and inspecting screenshots when setting up a shot or an image series. With waitUntilIdle it first waits for the wait indicato…
| Parameter | Type | Description |
|---|---|---|
items | Also return the screen rectangle of each element: 'visible', 'all', or a list of item IDs. Default 'none' — the summary is usually enough and much smaller. | |
nearestTo | object | Return the five elements nearest to this screen point, sorted by distance. This is how you pick a drag target or a click target without guessing from a screenshot. |
timeoutMs | integer | Upper bound for waitUntilIdle. Default 15000. |
waitUntilIdle | boolean | Wait until the wait indicator (.waitanim) is gone before measuring. |
kbb_fit_view Fit the view to a goal
Sets the zoom so the drawing meets a goal and centres the excerpt on it — the step that otherwise costs a dozen rounds of 'screenshot, look, guess a zoom, repeat'. goal 'all' brings every drawn element into frame with a margin; 'labelHeight' scales until the median label reaches a target height in pixels (readability); 'coverage' fills a share of the viewport area. Centring uses the bounding box, not the mean of the element centres — with elements far outside (deliberate on a whiteboard) the mean lands in an empty corner. Returns the same measurement as kbb_measure_view, plus how many roun…
| Parameter | Type | Description |
|---|---|---|
center | boolean | Centre the excerpt on the bounding box afterwards. Default true. |
coverage | number | Target share of the viewport area for goal 'coverage', 0 to 1. Default 0.55. |
dryRun | boolean | Report what would happen without making any changes. |
goal | string | What to fit for. Default 'all'. |
labelHeight | number | Target median label height in pixels for goal 'labelHeight'. Default 90. |
margin | number | Margin in pixels for goal 'all'. Default 40. |
maxRounds | integer | Maximum adjustment rounds. Default 5. |
maxZoom | number | Upper clamp for the zoom factor. Default 3.0. |
minZoom | number | Lower clamp for the zoom factor. Default 0.15. |
kbb_create_node Create node
Creates a single node, optionally connected to an existing parent node. For creating more than two nodes at once, kbb_create_subgraph is significantly faster.
| Parameter | Type | Description |
|---|---|---|
name * | string | Name of the node. |
category | string | Category/item template. |
description | string | Short description (single-line tooltip). |
dryRun | boolean | Report what would happen without making any changes. |
note | string | HTML note content. |
parentId | integer | Existing parent node ID to connect to. |
relation | string | Label of the connection to the parent. |
tags | array | Tag labels. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
url | string | Direct link URL. |
kbb_create_subgraph Create subgraph
Creates multiple nodes and their connections in a SINGLE server call and a SINGLE undo step. The primary workhorse for building mindmaps and diagrams. Nodes reference each other via arbitrary tempIds; the response returns the mapping tempId -> real item ID. Existing nodes can be specified in 'from'/'to' as numeric strings (e.g. "42").
| Parameter | Type | Description |
|---|---|---|
nodes * | array | Nodes to create. |
dryRun | boolean | Report what would happen without making any changes. |
relations | array | Connections between nodes. |
rootParentId | integer | Existing parent node ID to attach rootless nodes to. If omitted, creates a freestanding subgraph. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_update_node Update node
Updates fields of an existing node. Fields that are omitted remain unchanged.
| Parameter | Type | Description |
|---|---|---|
itemId * | integer | Item ID of the node to update. |
category | string | New category/item template. |
description | string | New short description (tooltip). |
dryRun | boolean | Report what would happen without making any changes. |
name | string | New node name. |
note | string | New HTML note content. |
tags | array | New tag labels. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
url | string | New link URL. |
kbb_set_dates Set dates and user data
Stores a point in time or a period on a node. A node with 'start' and 'end' appears as a bar on the timeline, a node with only 'start' as a point. Accepts 'YYYY-MM-DD', 'YYYY-MM-DDTHH:MM' and the shortened forms 'YYYY' and 'YYYY-MM'; the value is normalised before it is stored. Instead of 'end' a duration may be given. Pass null to remove a field. Fields that are omitted stay as they are, so this tool never wipes user data it was not told about. To set dates on many nodes in one undo step, wrap the calls in kbb_batch.
| Parameter | Type | Description |
|---|---|---|
itemId * | integer | Item ID of the node. |
dryRun | boolean | Report what would happen without making any changes. |
durationDays | number | Alternative to 'end': length of the period in days, counted from 'start'. |
durationHours | number | Alternative to 'end': length of the period in hours, counted from 'start'. |
end | End of the period. | |
fields | object | Further user data values such as {"status":"open","priority":4}. null removes a field. |
start | Point in time or start of the period. | |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_link Create connection
Creates a connection between two existing nodes.
| Parameter | Type | Description |
|---|---|---|
fromId * | integer | Source node item ID. |
toId * | integer | Target node item ID. |
backLabel | string | Reverse direction label. |
category | string | Relation template/category. |
dryRun | boolean | Report what would happen without making any changes. |
label | string | Connection label. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_get_relation Get connection
Everything stored on one connection: both labels, both 'as table' flags, description, category, tags, endpoints and its drawing properties. Read this before kbb_update_relation — the two labels and their table flags are one field in the database, so a partial update needs the current values. Connection IDs come from kbb_get_neighborhood ('relations[].id').
| Parameter | Type | Description |
|---|---|---|
relationId * | integer | Connection ID. |
kbb_update_relation Edit connection
Changes an existing connection: label, reverse label, the 'as table' switch for each direction, description, category and tags. Omitted fields stay as they are. 'As table' turns the connection from a branching line into a row of a small table inside the item — the way an attribute such as a year of birth is shown; whether such connections are ALSO drawn as lines is the 'tableRelations' switch of kbb_set_view_options. Colours and line shape are kbb_set_style; to create a connection use kbb_link, to remove one kbb_delete.
| Parameter | Type | Description |
|---|---|---|
relationId * | integer | Connection ID, from kbb_get_neighborhood. |
asTable | boolean | Show the forward direction as a table row inside the item instead of a line. |
backAsTable | boolean | The same for the reverse direction. |
backLabel | string | Label in the reverse direction. |
category | string | Relation template/category. Created automatically if it does not exist. |
description | string | Description of the connection. |
dryRun | boolean | Report what would happen without making any changes. |
label | string | Label in the forward direction. |
tags | array | Tag labels. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_delete Delete
Deletes nodes or connections. Can be undone via kbb_undo.
| Parameter | Type | Description |
|---|---|---|
dryRun | boolean | Report what would happen without making any changes. |
itemIds | array | Node IDs to delete. |
relationIds | array | Connection IDs to delete. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_set_style Format nodes and connections
Sets color, text color, shape, or icon for one or more nodes, and line color, line style, line width or arrows for one or more connections. Give itemIds, relationIds, or both. The style is written to the node itself, but a node that belongs to a category is drawn with its category's colours and shape only - for such nodes they are stored but not visible, and the answer carries a warning plus the list 'categorized'. Style those through kbb_update_category (applies to every node of the category) or remove them from their category first. Icons are different: they always belong to the single node…
| Parameter | Type | Description |
|---|---|---|
arrows | string | Arrow heads of a connection. Connections only. |
color | string | Hex background color of a node, or line color of a connection, e.g. "#c0392b". |
dryRun | boolean | Report what would happen without making any changes. |
icon | Item symbols: one number or a list of numbers 0-74, drawn as badges below the node in 2D and 3D; An emoji works as well, written as "e:" plus the emoji, e.g. "e:🚀". [] removes all symbols, a list r… | |
itemIds | array | Target node item IDs. |
lineStyle | string | Line style of a connection. Connections only. |
lineWidth | string | Line width of a connection. Connections only. |
relationIds | array | Target connection IDs, from kbb_get_neighborhood ('relations[].id'). |
shape | string | Node shape. Nodes only. |
textColor | string | Hex text color, e.g. "#ffffff". |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_set_diagram Format diagram
Sets diagram visual properties (background, palette colors, line width, etc.). For layout and display mode, use the dedicated tools kbb_set_layout / kbb_set_display_mode.
| Parameter | Type | Description |
|---|---|---|
properties * | object | Key-value pairs of diagram properties, e.g. {"bp":"nebula"} or {"bc":[14,22,40]}. Every key is written through and the diagram is redrawn, so keys missing from this list still work. Known keys: ba bc… |
dryRun | boolean | Report what would happen without making any changes. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_create_category Create category / template
Creates a new item or relation template, optionally with a style. An existing template of the same name is returned unchanged.
| Parameter | Type | Description |
|---|---|---|
name * | string | Category/Template name. |
color | string | Hex background color, e.g. "#c0392b". |
dryRun | boolean | Report what would happen without making any changes. |
icon | Item symbols: one number or a list of numbers 0-74, drawn as badges below the node in 2D and 3D; An emoji works as well, written as "e:" plus the emoji, e.g. "e:🚀". [] removes all symbols, a list r… | |
shape | string | Shape name (circle, rect, rhomb, hexagon, ...). |
textColor | string | Hex text color. |
type | string | Template type. Default 'item'. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_update_category Update category / template
Renames a category/template and/or changes its style. Renaming always works; changing the style requires at least one element of that template to be currently drawn — navigate there with kbb_focus_node first.
| Parameter | Type | Description |
|---|---|---|
categoryId * | integer | Category ID from kbb_get_categories. |
color | string | New hex background color. |
dryRun | boolean | Report what would happen without making any changes. |
icon | Item symbols: one number or a list of numbers 0-74, drawn as badges below the node in 2D and 3D; An emoji works as well, written as "e:" plus the emoji, e.g. "e:🚀". [] removes all symbols, a list r… | |
name | string | New category name. |
shape | string | New shape name. |
textColor | string | New hex text color. |
type | string | Template type. Default 'item'. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_add_attachment Attach a repository entry
Links an EXISTING entry of the attachment repository to a node or connection. To put a new file into the repository use kbb_import_attachment. Use kbb_get_attachments without itemId to see what the repository holds.
| Parameter | Type | Description |
|---|---|---|
attachToItemId * | integer | Node (or connection) ID to link to. |
dryRun | boolean | Report what would happen without making any changes. |
isRelation | boolean | attachToItemId denotes a connection. Default false. |
name | string | Repository entry name. Must be unambiguous. |
recordId | integer | Repository entry ID. Preferred over name. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_import_attachment Import a file into the attachment repository
Puts a NEW file into the attachment repository and, when attachToItemId is given, links it to a node or connection in the same undo step. There are two ways in. PREFERRED: filePath — the relay reads the file from the local disk, so nothing travels through the conversation, and it fills in the full text and the thumbnail itself using whatever extractors the machine already has (built in for txt/md/csv/json/xml/html/rtf/docx/xlsx/pptx/odt/ods/odp; pdftotext, pdfjs-dist or pdf-parse for PDF text; pdftoppm, pdftocairo, magick or ghostscript for the page image; LibreOffice for the old binary Offi…
| Parameter | Type | Description |
|---|---|---|
attachToItemId | integer | Node (or connection) to link the new entry to. Without it the entry only enters the repository. |
dataUri | string | The file itself as a data URI, e.g. "data:application/pdf;base64,JVBERi0…". Only needed when the relay cannot read the file from disk; then fileName is required. |
description | string | Entry description. Default: the data size, the way the app writes it. |
dryRun | boolean | Report what would happen without making any changes. |
extractPreview | boolean | Let the relay render a thumbnail for documents. Default true; switch it off to keep the payload small or to skip a slow LibreOffice conversion. |
extractText | boolean | Let the relay extract the text. Default true, unless 'text' is given. |
fileName | string | File name including the extension, e.g. "Handbuch.pdf". The extension becomes the entry type, the part before it the entry name unless 'name' says otherwise. With filePath it defaults to the name on d… |
filePath | string | Path of the file on the machine the relay runs on. The relay reads it itself and derives fileName, MIME type, text and thumbnail. Preferred over dataUri. |
isRelation | boolean | attachToItemId denotes a connection. Default false. |
maxTextChars | integer | Upper bound for the extracted text. Default 100000, as in generate_metadata.py. |
name | string | Entry name. Default: the file name without its extension. |
previewDataUri | string | Thumbnail as a data URI, "data:image/png;base64,…". Only needed when the relay cannot render one itself; for images the app makes its own. |
previewFilePath | string | Thumbnail as a local image file, read by the relay. Wins over its own rendering. |
text | string | Text content of the file, so the full-text search reaches it. Leave it out to let the relay extract the text itself. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
updateExisting | boolean | Overwrite an entry with the same uri (or name and type) instead of adding a second one. |
uri | string | Stable key of the entry for updateExisting. Default: derived from name and type, the same rule the app and generate_metadata.py use. |
kbb_detach_attachment Detach attachment
Removes one link between a repository entry and a node, leaving the entry itself in the repository.
| Parameter | Type | Description |
|---|---|---|
attachmentId * | integer | ID of the LINK, from kbb_get_attachments — not the node ID and not the repository entry ID. |
dryRun | boolean | Report what would happen without making any changes. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_delete_attachment Delete repository entry
Deletes an entry from the attachment repository together with all its links. To remove a single link only, use kbb_detach_attachment.
| Parameter | Type | Description |
|---|---|---|
recordId * | integer | Repository entry ID from kbb_get_attachments. |
dryRun | boolean | Report what would happen without making any changes. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_set_node_position Set node spatial position
Places a drawn node at a fixed spot. On a whiteboard the spot is stored per board, in the other layouts per parent node — existing positions for other boards or parents are preserved. The node must currently be drawn (kbb_focus_node).
| Parameter | Type | Description |
|---|---|---|
itemId * | integer | Item ID. |
x * | number | X coordinate relative to the board/parent element. |
y * | number | Y coordinate relative to the board/parent element. |
dryRun | boolean | Report what would happen without making any changes. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_create_whiteboard Create whiteboard
Creates a new whiteboard space (root item tagged #board) and enters whiteboard mode on it. Cards placed there keep their position (kbb_set_node_position). Diagram view only.
| Parameter | Type | Description |
|---|---|---|
name * | string | Whiteboard title. |
category | string | Category for the whiteboard root. Default: none. |
dryRun | boolean | Report what would happen without making any changes. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_set_whiteboard_mode Enter or leave whiteboard mode
Enters or leaves whiteboard mode. Whiteboard is a MODE, not a layout — never use kbb_set_layout(19) for this. With whiteboardId, switches to that space (ids from kbb_get_whiteboards); without it, opens the last used space, or the first one, or creates one. state 'leave' returns to the layout that was active before and keeps the board element as the root item; with returnToPreviousRoot it loads the diagram the whiteboard was entered from instead. Diagram view only.
| Parameter | Type | Description |
|---|---|---|
dryRun | boolean | Report what would happen without making any changes. |
returnToPreviousRoot | boolean | Only for state 'leave': go back to the diagram the whiteboard was entered from instead of staying on the board element. Needs a remembered diagram — see whiteboardReturnItemId in kbb_get_ui_state. D… |
state | string | Enter or leave whiteboard mode. Default 'enter'. |
whiteboardId | integer | Whiteboard space to open, from kbb_get_whiteboards. Only for state 'enter'. |
kbb_dissolve_whiteboard Dissolve whiteboard
Dissolves the open whiteboard: the board element only loses its #board tag. Cards and connections stay and remain reachable as an ordinary diagram — the way to start a fresh space without losing the old one. To remove the space itself, delete the item instead.
| Parameter | Type | Description |
|---|---|---|
dryRun | boolean | Report what would happen without making any changes. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_convert_to_whiteboard Turn diagram into whiteboard
The counterpart of kbb_dissolve_whiteboard: turns the diagram in front of you into a whiteboard space. The root item gets the #board tag, everything reachable from it becomes a card and keeps the position the layout gave it. Acts on the root item of the loaded excerpt — move another item there with kbb_focus_node first. For an EMPTY space use kbb_create_whiteboard. Diagram view only; fails if the root is already a space. To reverse it use kbb_dissolve_whiteboard — kbb_undo needs several steps, because the first draw stores each card position as an undo step of its own.
| Parameter | Type | Description |
|---|---|---|
dryRun | boolean | Report what would happen without making any changes. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_move_kanban_card Move Kanban card
Moves a Kanban card to another column (category) and/or swimlane (tag). Existing tags such as #hidden are kept; name the tag being replaced in oldLaneTag.
| Parameter | Type | Description |
|---|---|---|
itemId * | integer | Card item ID. |
dryRun | boolean | Report what would happen without making any changes. |
newLaneTag | string | New swimlane tag. |
newStatusCategory | string | New column status category. |
oldLaneTag | string | Swimlane tag to remove. Omit to keep all existing tags. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_batch Batch multiple commands
Executes multiple tool calls in a SINGLE undo step and with exactly one redraw. For pure structure creation, kbb_create_subgraph is preferred — this tool is meant for mixed sequences (create, format, focus). Nesting is not supported.
| Parameter | Type | Description |
|---|---|---|
steps * | array | Sequence of tool calls to execute. |
dryRun | boolean | Report what would happen without making any changes. |
onError | string | Default "abort". When "continue", response contains partial results per step. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_undo Undo / Redo
Undoes or redoes the latest steps. Each tool call through this bridge forms exactly one undo step. Instead of counting steps you can name one with toLabel — everything up to and including that entry is taken back. Read the list with kbb_get_undo_history first.
| Parameter | Type | Description |
|---|---|---|
direction | string | Direction. Default "undo". |
steps | integer | Number of steps. Default 1. |
toLabel | string | Undo (or redo) up to and including the entry with this label, as it stands in kbb_get_undo_history. Wins over 'steps'. The newest match counts; an unknown label is an error, nothing is taken back. |
kbb_create_database Create database
Creates a new, empty knowledge base and opens it. Web application only — the desktop and mobile apps work on files. Names are not unique; the response returns the new databaseId.
| Parameter | Type | Description |
|---|---|---|
name * | string | Database name to create. |
dryRun | boolean | Report what would happen without making any changes. |
switchTo | boolean | Open the new database. Default true. |
kbb_open_database Open database
Switches to another knowledge base and reloads the view. Web application only. An ambiguous name is refused — pass databaseId from kbb_list_databases instead.
| Parameter | Type | Description |
|---|---|---|
databaseId | integer | Database ID from kbb_list_databases. |
name | string | Database name. Must be unambiguous. |
kbb_delete_database Delete database
Permanently deletes a knowledge base — this cannot be undone by kbb_undo. The named database is opened first, because the backend always deletes the one currently open. Afterwards the app opens whichever database the server hands back. An ambiguous name is refused; pass databaseId instead.
| Parameter | Type | Description |
|---|---|---|
databaseId | integer | Database ID from kbb_list_databases. |
dryRun | boolean | Report what would happen without making any changes. |
name | string | Database name. Must be unambiguous. |
kbb_export_database Export database
Exports the complete active database as JSON — items, relations, and both template sets, in exactly the shape kbb_import_database expects. Exporting a subgraph or XML is not supported by the backend.
| Parameter | Type | Description |
|---|---|---|
includeNotes | boolean | Include HTML notes. Default true; false keeps the payload small. |
kbb_import_database Import database
Imports a JSON document in the shape returned by kbb_export_database into the active knowledge base. XML is not supported — convert it first.
| Parameter | Type | Description |
|---|---|---|
data * | string | JSON string, or the object returned under 'data' by kbb_export_database. |
dryRun | boolean | Report what would happen without making any changes. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
updateExisting | boolean | Update elements whose IDs already exist instead of adding copies. |
kbb_import_wikipedia Import Wikipedia article
NOT AVAILABLE over this bridge and always returns NOT_SUPPORTED. The import runs through the app's own dialog on the element toolbar. To build the same graph, fetch the article structure yourself and create it with kbb_create_subgraph.
| Parameter | Type | Description |
|---|---|---|
articleTitle * | string | Wikipedia article title. |
language | string | Language code. |
kbb_import_wikidata Import Wikidata SPARQL
NOT AVAILABLE over this bridge and always returns NOT_SUPPORTED. The import runs through 'Edit diagram → Wikidata import'. To build the same graph, run the SPARQL query yourself and create the result with kbb_create_subgraph.
| Parameter | Type | Description |
|---|---|---|
sparqlQuery * | string | SPARQL query string. |
kbb_import_pseudocode Import pseudocode
Turns an indented text outline into a node tree: each line becomes a node, indentation becomes the parent relation.
| Parameter | Type | Description |
|---|---|---|
pseudocode * | string | Indented text block, one node per line. |
dryRun | boolean | Report what would happen without making any changes. |
parentId | integer | Existing node to hang the top-level lines under. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_focus_node Focus node
Makes a node the root element of the view — the app visibly navigates to it. Useful to show the user in real-time what is being discussed.
| Parameter | Type | Description |
|---|---|---|
itemId * | integer | Item ID to focus as root. |
searchText | string | Optional text to highlight. |
kbb_select_nodes Select nodes
Selects nodes in the diagram without changing the root node.
| Parameter | Type | Description |
|---|---|---|
itemIds * | array | Item IDs to select. An empty array clears the selection. |
kbb_set_display_mode Switch display mode
Switches between 2D diagram, table view, and 3D mode. Note: Kanban is NOT a display mode, but layout 20 in diagram mode — use kbb_set_layout instead.
| Parameter | Type | Description |
|---|---|---|
mode * | string | Target display mode. |
kbb_set_layout Set layout
Sets the diagram layout. Layout 20 is the Kanban/Scrum board. With threeD=true, sets the 3D layout instead. Layout 19 is rejected: that is the whiteboard arrangement, and whiteboard is a mode — use kbb_set_whiteboard_mode.
| Parameter | Type | Description |
|---|---|---|
layout * | integer | Layout number. 20 = Kanban. 19 is not allowed here. |
threeD | boolean | Set 3D layout instead of 2D. Default false. |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
kbb_adjust_view Adjust view sliders
Sets the diagram view sliders to absolute values and redraws: zoom, distance, rotation, perspective. Values match what kbb_get_ui_state reports. These are view settings, not diagram properties - they create no undo step, exactly like the sliders in the Adjust View gallery.
| Parameter | Type | Description |
|---|---|---|
distance | number | Node distance factor, 1 = 100 %. Matches stretchFact. |
perspective | number | Perspective in percent, 0-100. |
reset | boolean | Reset all four sliders to their default. |
rotation | number | Rotation in degrees, 0-360. |
stretch | number | Deprecated alias for distance. |
zoom | number | Zoom factor, 1 = 100 %. Matches zoomFact. |
kbb_save_bookmark Save bookmark
Saves the current view — zoom, stretch, rotation, perspective, layout, display mode, panel state, and root item — as a named bookmark, persisted in the database and listed in the view gallery.
| Parameter | Type | Description |
|---|---|---|
name * | string | Bookmark name. |
dryRun | boolean | Report what would happen without making any changes. |
saveRootItem | boolean | Include the current root item. Default true. |
setAsInitial | boolean | Use as the initial view when the database opens. |
kbb_restore_bookmark Restore bookmark
Restores a saved view and loads its root item. Panel visibility is not restored — only the view itself.
| Parameter | Type | Description |
|---|---|---|
index | integer | Bookmark index from kbb_list_bookmarks. |
name | string | Bookmark name. |
kbb_set_camera_3d Set 3D camera
Sets and locks exact 3D camera coordinates and rotation for deterministic 3D rendering.
| Parameter | Type | Description |
|---|---|---|
lock | boolean | Lock camera from mouse drag. |
position | object | Camera position. |
rotation | object | Camera rotation. |
kbb_get_camera_3d Get 3D camera
Reads back the actual Three.js camera: position, rotation, field of view, aspect, near/far, the OrbitControls target, the distance from camera to target, and whether it is locked. The read counterpart to kbb_set_camera_3d — no more guessing coordinates or reading them via prototype hooks.
kbb_toggle_ui_panel Toggle UI side panel
Opens or closes one of the side galleries through the app's own widget, so the sidebar strip, the panel group, and the diagram viewport follow along. "sidebar" pins or unpins the sidebar itself. Pass "section" to reach a collapsible section INSIDE a gallery — opening the gallery does not open the sections in it, and most controls a manual points at live in one of them. With a section given the gallery is opened first and "state" then applies to the section.
| Parameter | Type | Description |
|---|---|---|
panel * | string | Panel to control. "tools" holds the whiteboard list, the Kanban sections, presentation and learning mode. |
section | string | Collapsible section inside that gallery, by its class name — e.g. 'id-editmode-undo' for the undo list, 'id-tools-agent' for the AI control section, 'id-viewmode-labels' for the label switches. The… |
state | string | Desired state. Default 'toggle'. |
kbb_timeline Control the timeline
Shows, hides and steers the timeline strip below the diagram. The strip starts closed unless a saved view of the database opens it; it then stays open across a change of the root item, but a change of the database closes it again and the new database decides anew. A click on one of its entries makes that node the centre of the diagram. 'fit' scales the visible period to the data, 'range' sets it explicitly, 'state' only reports. Without a field of its own the strip draws every date field the types of the database declare, which is how it starts; naming a 'field' pins it to that one, and 'field…
| Parameter | Type | Description |
|---|---|---|
action | string | What to do. Default 'state'. |
endField | Field holding the end of a period. null restores the automatic choice. | |
field | Date field the strip draws. null restores the automatic choice, in which every field declared by the types of the database is drawn. | |
from | string | Start of the visible period, for action 'range'. |
height | integer | Height of the strip in pixels. |
to | string | End of the visible period, for action 'range'. |
kbb_set_view_options Set view switches
Sets the switches of the "Adjust view" gallery by ABSOLUTE value, not by toggling — so a call is repeatable and needs no prior DOM read. Omitted options stay as they are; the answer always reports the state of every option afterwards. These are the switches of the diagram and label sections; zoom, stretch, rotation and perspective are sliders and belong to kbb_adjust_view, and the layout belongs to kbb_set_layout. The diagram switches are stored as diagram properties and survive a reload; the label switches are part of the session, exactly as when clicked by hand.
| Parameter | Type | Description |
|---|---|---|
allLabels | boolean | The 'show all labels' switch — sets categories, note tag, description tag, relation counts and item shift in one go. Applied before the single label switches, so those still win. |
animateTransitions | boolean | Animate transitions ('atran'). |
categories | boolean | Show the category label on an item. |
crossLinks | boolean | Draw connections that are not tree edges ('wcl'). |
decreaseChildElements | string | How child items shrink with depth ('dce'). |
depthFog3D | boolean | 3D only: cards and lines behind the point the camera looks at fade towards the background colour, so near and far can be told apart at a glance ('fog3d', on by default). |
descriptionTag | boolean | Show the marker for items that carry a description. |
duplicateRelationsAsOne | boolean | Collapse several connections between the same two items into one line ('sdrao'). |
expandItems | boolean | Draw items in their expanded form ('iex'). |
hiddenRelationCount | boolean | Show the number of hidden connections. |
itemShift | boolean | Show the marker for manually shifted items. |
lightCards | boolean | Light cards ('lc', off by default): the item colour tints the card and draws a stripe on its left edge instead of filling it; text is dark. The root keeps its full colour, whiteboard notes stay fully… |
markRootItem | boolean | Mark the root item ('mri'). |
moreRelationCount | boolean | Show the number of further connections. |
noteTag | boolean | Show the marker for items that carry a note. |
tableRelations | boolean | Additionally draw connections that are shown as a table row ('wtr'). |
undoLabel | string | Label for the undo group. Default: 'AI: <ToolName>'. |
userData | boolean | Show the data fields of an item as rows of its table ('wud'). The values come from the item's user data; which fields exist is kbb_get_userdata_schema. Off by default. |
userDataChips | boolean | Draw the data fields as chips instead of table rows ('udc', on by default): start and end as one period, the status as a coloured dot with its word, the assignee with initials. Rows that come from tab… |
kbb_browse Browse history
The chronological history of root items — the app's own Browse back / Browse forward, and the 'last viewed' list. kbb_focus_node jumps somewhere; this is the way back. 'back' and 'forward' walk one step, 'goto' jumps straight to an entry by its index, 'list' only reads. The history lives per database in the browser profile, so it is empty right after a database switch.
| Parameter | Type | Description |
|---|---|---|
action | string | What to do. Default 'back'. |
index | integer | For 'goto': position in the history, 0 being the most recent entry. |
kbb_get_undo_history Read undo and redo list
The undo and redo lists as the edit gallery shows them — newest first, index 0 being the most recent step. Every write through this bridge is exactly one entry, labelled with its undoLabel, so this is the way to check what an assistant has done and to hand kbb_undo the right number of steps (or its toLabel).
| Parameter | Type | Description |
|---|---|---|
limit | integer | Maximum entries per list. Default 20. |
kbb_run_screenplay Run screenplay script
Executes a complete choreographed screenplay in the frontend: animated mouse cursor, typing effects, smooth scrolling, voiceover narration, and macros. Returns when the script has finished; speed and speech settings are restored afterwards. A blocking run is capped at 50 s, because MCP clients cancel longer calls. For anything longer set runDetached: true — the call then answers immediately with a runId, the script keeps playing, and its end arrives as a 'run_finished' event (kbb_wait_for_event) or through kbb_run_status.
| Parameter | Type | Description |
|---|---|---|
script * | array | Array of screenplay actions or macros. |
runDetached | boolean | Answer immediately with a runId instead of waiting. Required for scripts that play longer than about 50 s. Default false. |
skipSpeech | boolean | Disable TTS narration for this run. Default false. |
speed | string | Playback speed. Default 'normal'. |
kbb_animate_cursor_move Animate mouse cursor movement
Smoothly animates the virtual mouse cursor (.kbb-sp-cursor) to a selector or pixel coordinate.
| Parameter | Type | Description |
|---|---|---|
speedFact | number | Speed multiplier. Default 1.0. |
targetPos | object | Target pixel coordinate. |
targetSelector | string | CSS selector of target element. |
kbb_animate_click Animate mouse click
Moves the virtual mouse cursor to an element, visualizes mousedown, and triggers the click. Name the target by CSS selector, or by itemId — the way to reach a node in the 3D view, where nodes are not DOM elements. A click on a node selects it as with the mouse; in edit mode that shows its selection ring and item toolbar, in 2D and 3D. relationId (3D only) selects a connection, shows its toolbar and its two end-point handles.
| Parameter | Type | Description |
|---|---|---|
button | string | Mouse button. Default 'left'. |
doubleClick | boolean | Trigger double-click. Default false. |
itemId | integer | Node to click, in 2D and 3D. Used when targetSelector is omitted. |
relationId | integer | 3D only: connection to click. Used when targetSelector and itemId are omitted. |
speedFact | number | Speed multiplier. Default 1.0. |
targetSelector | string | Target element CSS selector. Required unless itemId or relationId is given. |
kbb_animate_drag Animate drag and drop
Animates dragging an element to another element or by a relative pixel delta. With node IDs it draws a new connection the way a user does, in 2D and 3D: fromItemId to toItemId links two nodes; fromItemId with toSelector drops onto an entry of the 'Items in category' panel; fromSelector (a panel entry) with toItemId drops onto a node. relationId with relationEnd and toItemId (3D only) drags the start or end handle of that connection onto another node.
| Parameter | Type | Description |
|---|---|---|
dx | number | Delta X pixels if dragging by distance. |
dy | number | Delta Y pixels if dragging by distance. |
fromItemId | integer | Source node of a new connection (2D and 3D). |
fromSelector | string | Source element CSS selector. |
relationEnd | string | Which end of relationId to drag. Default 'end'. |
relationId | integer | 3D only: connection whose start or end is dragged to toItemId. |
speedFact | number | Speed multiplier. Default 1.0. |
toItemId | integer | Target node of a new connection, or the node a connection end is moved to. |
toSelector | string | Target element CSS selector. |
kbb_animate_kanban_move Animate Kanban card move
Drags a Kanban card visibly from one field of the board into another — the very gesture a user performs with the mouse. The card is grabbed at its anchor point on its bottom edge, the point that decides the target cell, and dropping it writes the column's category, the lane's tag and the rank inside the cell in one undo step. Requires the Kanban layout (20) in display mode 'diagram'; edit mode is switched on when needed. Use kbb_move_kanban_card instead when no animation is wanted, and kbb_animate_drag for free dragging by a pixel delta. Keep speedFact at 0.5 or above: a slower drag can outr…
| Parameter | Type | Description |
|---|---|---|
itemId * | integer | Card item ID. |
dryRun | boolean | Report what would happen without making any changes. |
position | string | Where to drop inside the target cell. Default 'keep' holds the card's height — a straight horizontal drag; 'start' and 'end' put it first or last in the cell. |
speedFact | number | Speed multiplier. Default 1.0. |
toColumn | Target column: its name as written on the board, or its number from the left, starting at 0. Omit to keep the current column. | |
toLane | Target swimlane: its name, or its number from the top, starting at 0. Omit to keep the current lane. At least one of toColumn and toLane is required. |
kbb_animate_type_text Animate text typing
Animates character-by-character text typing into an input field, textarea, or rich text iframe.
| Parameter | Type | Description |
|---|---|---|
targetSelector * | string | Target input, textarea, or iframe CSS selector. |
text * | string | Text to type. |
paste | boolean | Instant paste instead of character-by-character. Default false. |
speedFact | number | Speed multiplier. Default 1.0. |
withKeyboard | boolean | Simulate keyboard keydown/keypress events. Default false. |
kbb_narrate_speech Narrate speech (TTS)
Speaks text through the browser's Web Speech API. By default the call returns as soon as speech starts; pass waitForFinished to keep the next tool call from talking over the sentence.
| Parameter | Type | Description |
|---|---|---|
text * | string | Text to speak. |
rate | integer | Speech rate in percent, 100 = 1.0x. Default: the screenplay rate. |
voiceIndex | integer | Index into the browser voice list. Default: the screenplay voice. |
waitForFinished | boolean | Return only once the voice has finished. Default false. Capped at 110s. |
kbb_show_overlay_panel Control tutorial text overlay panel
Controls the slide-in explanatory text panel (.kbb-screenplay-text-panel) for video commentary.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform on the panel. |
htmlContent | string | HTML content for 'show' or 'append'. |
kbb_show_callout Show documentation callout
Shows an explanatory callout box that points at a control or a diagram node, the way a manual annotates a screenshot. Several callouts can be open at once; each has an id and can be closed on its own. The box follows its target while the diagram is zoomed, panned or redrawn. Styles: 'card' (light manual card with a leader line), 'bubble' (speech bubble with a tail at the target), 'spotlight' (dims the app and cuts the targets out), 'glass' (dark translucent, fits dark diagrams), 'pins' (numbered pin at the target, text in a shared legend on the right — best when annotating many things at onc…
kbb_presentation Presentation mode
Drives the app's own presentation mode — the guided tour through the diagram. It does two things no other tool can: it loads the map WITH the description texts (the map call ties that to "items expanded or presentation running"), and in the 3D view it folds the other branches away. That combination is what makes "one card open, all others closed" possible; without it the client never receives the description text and every card stays shut, the one being looked at included. The tour order follows the drawn child items, depth first from the starting node. 'start' enters the mode and shows the…
| Parameter | Type | Description |
|---|---|---|
action | string | What to do. Default 'status'. |
imageZoom | boolean | 'start': slow zoom into the photo of the image slide (35 % over 5 s). Default: the app's current setting. |
images | boolean | 'start': after flying to an item that has an image attachment, lay the photo in full resolution over the diagram with name and description as a lower third. Default false, because recording scripts sh… |
itemId | integer | 'start': node the tour starts from and descends through. Must be drawn. Default: the current root item. 'showImage': item whose photo to show; default the item in focus. |
showFirstStep | boolean | 'start': show the first step right away. Default true — with false the mode is armed but the picture stays as it is. |
step | integer | 'goto': step index, 0 being the first. |
kbb_show_media Show still image overlay
Shows a still image full screen over the whole app, with an optional slow Ken Burns move. Built for tutorial recordings that have to show material the app cannot draw itself — a settings dialog of another program, a config file, a web page — without cutting a second source into the recording afterwards; and for showing an image from the attachment repository during a guided tour. The overlay sits above everything the app draws but below callouts, so kbb_show_callout still annotates on top of it. Only one overlay exists at a time: showing another image cross-fades to it. Images only — vid…
| Parameter | Type | Description |
|---|---|---|
action | string | What to do. Default 'show'. |
background | string | Color behind the image, any CSS color. Default '#000000'. |
fade | integer | Fade in/out and cross-fade duration in ms. Default 240. |
fit | string | 'contain' shows the whole image and letterboxes it, 'cover' fills the frame and crops. Default 'contain'. |
id | string | Overlay id, reported back in status. Generated when omitted. |
ken | string | Ken Burns preset. The direction names where the visible section travels. Default 'in' — a slow 6 % zoom in. Use 'none' for a dead still. |
kenDuration | integer | Length of the move in ms. Default 8000. Set it to the beat length so the move ends with the beat. |
kenEasing | string | CSS timing function of the move. Default 'linear' — anything else reads as a camera stutter. |
kenFrom | object | Own start state, overrides the preset. |
kenTo | object | Own end state, overrides the preset. |
recordId | integer | Repository record to show, from kbb_get_attachments. Must be an image. |
recordName | string | Repository record by name — exact match first, then the first one containing it. |
url | string | Image address. Anything the browser can load, e.g. 'stills/S4.png' next to the app. |
kbb_present_node Present node with spotlight
Spotlights a node, centers the camera on it, and optionally narrates its title and description. The node must currently be drawn — navigate there with kbb_focus_node first. Narration is not awaited; use kbb_narrate_speech with waitForFinished for that.
| Parameter | Type | Description |
|---|---|---|
itemId | integer | Item ID to present. |
itemName | string | Item name to present. |
narrate | boolean | Speak item title and description. Default true. |
speechText | string | Custom narration text override. |
kbb_collab_state Collaboration state
Web edition only. Who else is working on the shared knowledge base right now (name, selected item, root item, item being edited), your own participant ID and the current revision. Pass 'name' once at the start so others see your comments under that name. Pass 'sinceRev' (a 'rev' from an earlier call) to also get the changes made since then, with author and item IDs — the cheap way to see what the other participants built. An AI participant carries 'agent': its status from kbb_collab_status, seconds since its last command, the time left of what it announced, 'overdue' and a 'hint' when it is…
| Parameter | Type | Description |
|---|---|---|
name | string | Display name to use from now on, e.g. 'Claude' or 'Gemini'. Max 32 characters. |
sinceRev | integer | Also list changes after this revision (at most the latest 60). |
kbb_collab_status Set own collaboration status
Web edition only, shared knowledge base. Tells the other participants what you are doing and how long it should take; they see it in kbb_collab_state as participants[].agent. The app also records when you last sent any command. An AI stuck on a confirmation prompt in its own client cannot report anything — the others recognise it because the announced time is over and no command arrived since ('overdue' plus a 'hint'). So set 'working' with etaSeconds before a longer step, 'waiting_for_others' before waiting for replies, and 'waiting_for_user' when you hand over to your human.
| Parameter | Type | Description |
|---|---|---|
state * | string | What you are doing now. |
etaSeconds | integer | Expected duration. After it, silence counts as overdue. |
note | string | Short note, e.g. 'measuring variant B at 5 stations'. |
kbb_get_comments Get comment threads
Web edition only. Reads the comment threads of the knowledge base, oldest comment first. Open threads only unless includeDone is set. Each thread has threadId, the item or relation it belongs to, done, and its comments (commentId, byName, own, text, time, and image: true when a picture is attached — fetch it with kbb_get_comment_image). The answer carries a 'cursor': pass it as 'since' next time to get exactly what is new, marked with isNew on comments by others. Never guess a 'since' time yourself — a guess too late silently hides replies.
| Parameter | Type | Description |
|---|---|---|
includeDone | boolean | Also return resolved threads. Default false. |
itemId | integer | Only threads on this item. |
relationId | integer | Only threads on this relation. |
since | string | The 'cursor' of an earlier call; only threads with a comment newer than this. |
kbb_get_comment_image Get the picture of a comment
Web edition only. Returns the picture another participant attached to a comment with kbb_comment attachCapture — so you judge the same image instead of a description of it. kbb_get_comments marks such comments with image: true.
| Parameter | Type | Description |
|---|---|---|
commentId * | string | commentId from kbb_get_comments. |
kbb_comment Write comment
Web edition only. Writes to the comment threads shared with everyone who has the knowledge base open — the channel for agreeing on a split of work, asking and answering questions, and reporting progress. 'add' starts a thread on an item (use the root item for general topics) or a relation, 'reply' answers a thread, 'resolve'/'reopen' mark a whole thread, 'delete' removes one of your own comments (a thread start takes its replies along). attachCapture adds a picture of your current view (like kbb_capture_view) to the comment: the others fetch it with kbb_get_comment_image and humans see it in…
| Parameter | Type | Description |
|---|---|---|
action | string | Default 'add'. |
attachCapture | boolean | add, reply: attach a picture of your current view. Shared knowledge bases only. |
captureMaxSize | integer | Longest side of the attached picture in pixels. Default 960. |
commentId | string | delete: comment ID. |
itemId | integer | add: item to comment on. |
relationId | integer | add: relation to comment on (instead of itemId). |
stageSeq | integer | add, reply: refer to this step of a live presentation (seq from collab_stage); prefixed as '[Step n]'. |
text | string | add, reply: comment text, max 2000 characters. |
threadId | string | reply, resolve, reopen: thread ID. |
kbb_stage Live presentation
Web edition only, shared knowledge base. 'start' makes you the presenter: everyone else with the share link follows live — your display mode (2D/3D), root item, the item you fly to with kbb_present_node or select, slides from kbb_show_media (repository images), callouts from kbb_show_callout and, in 3D, a camera you turned by hand after a flight. 'end' stops it (the owner may end anyone's). 'status' tells who presents, the current step (seq) and its state. Viewers receive one 'collab_stage' event per step with item name, description, note text, spoken text, slide and callout texts — an AI…
| Parameter | Type | Description |
|---|---|---|
action | string | Default 'status'. |
kbb_capture_view Capture the current view as an image
Returns a picture of what the app shows right now — diagram in 2D or 3D, toolbars, slides from kbb_show_media and callouts — as an image you can look at, plus size and display mode. Use it to judge readability, overlaps and the overall impression, e.g. as an AI viewer of a live presentation after each 'collab_stage' event, or to check your own layout. Takes about 0.5–1 s. Keep maxSize modest: every image costs context.
| Parameter | Type | Description |
|---|---|---|
maxSize | integer | Longest side in pixels. Default 1280. |
quality | number | JPEG quality. Default 0.8. |
kbb_stage_say Say during a live presentation
Web edition only. Sets the spoken text of the current step of your live presentation: human viewers see it as a subtitle, AI viewers receive it in the 'collab_stage' event. Call it right after flying to the item with kbb_present_node — moving to another item clears the text.
| Parameter | Type | Description |
|---|---|---|
text * | string | Narration for the current step. |
kbb_learn_cards Get study cards
Lists the study cards of the open knowledge base that already have learning progress, with their state after the FSRS scheduler: due flag and due date, recall probability, stability, reviews and lapses. Card keys are 'targetType:targetId:cardType:direction' (0:42:0:0 = description card of item 42, 1:7:1:0 = connection 7 forward, 1:7:3:0 = the label of connection 7, 0:42:4:0 = parts of item 42, 0:42:5:0 = date, 0:42:6:n = n-th highlighted gap, 0:42:2:0 = category). 'text' and 'itemIds' are filled for cards whose items are in the loaded diagram. 'missingDescriptions' lists items of the loaded di…
| Parameter | Type | Description |
|---|---|---|
filter | string | 'due' (default): due now; 'problem': forgotten at least twice or recall below 80 %; 'all'. |
limit | integer | Maximum number of cards. Default 50. |
kbb_learn_stats Get learning statistics
Learning statistics of the open knowledge base: number of cards with progress, due, mature (stability of at least 7 days) and still learning; retention over the last 30 days (share of reviews not rated 'again'), reviews and active days in the last 30 days, the current streak of consecutive learning days, today's new cards and reviews, and the ten hardest cards (forgotten at least twice).
kbb_learn_record Record study answers
Records how well the user knew cards you quizzed in the conversation, exactly like a learning session in the app: each answer is scheduled with FSRS and written to the learning progress and the review log. Rating 1 = again (not known), 2 = hard, 3 = good, 4 = easy. Unknown keys start as new cards. Creates no undo step and does not change the diagram. Only record answers the user actually gave.
| Parameter | Type | Description |
|---|---|---|
answers * | array | Answers to record. |
kbb_learn_start Start or open learning mode
Opens the 'Memorize items' dialog or directly starts a learning session, exam, statistics dialog, or the Knowledge Map overlay. Default mode 'dialog' opens the setup dialog (with optional itemIds as scope 'Selected items'). Mode 'learn' launches the quiz immediately; pass cardKeys (e.g. ['0:3:6:1', '1:35:1:0']) to present those exact cards in deterministic order without random shuffling. Mode 'exam' opens the exam setup, 'stats' opens the learning statistics dialog, and 'map' toggles the Knowledge Map overlay (controlled via active).
| Parameter | Type | Description |
|---|---|---|
active | boolean | Only for mode 'map': true to enable Knowledge Map (default), false to disable. |
cardKeys | array | Exact list of card keys to present in deterministic order without shuffling (used with mode 'learn'). |
itemIds | array | Nodes to learn (must be in the displayed diagram). |
mode | string | 'dialog' (default): open setup dialog; 'learn': start session immediately; 'exam': exam dialog; 'stats': statistics dialog; 'map': toggle Knowledge Map. |
options | object | Optional learning session display/behavior toggles applied before starting. |
scope | string | Scope without itemIds. Default 'diagram'. |
kbb_learn_step Interact with active learning session
Inspects or drives the currently open learning window, exam dialog, or statistics dialog: 'status' reads the visible question, answer options, and card state; 'reveal' flips a flashcard; 'answer' selects a multiple-choice option (by 0-based index or matching text), checks multi-select parts (indices), or submits a typed answer (text); 'rate' grades a revealed flashcard (1 again, 2 hard, 3 good, 4 easy); 'next' advances past a new-card memorize step; 'close' closes the learning window and any open learn/exam/stats dialogs.
| Parameter | Type | Description |
|---|---|---|
action * | string | Action to perform on the active learning UI. |
index | integer | 0-based option index for 'answer' (single choice / true-false). |
indices | array | 0-based option indices for 'answer' on multi-select Parts cards. |
rating | integer | Self-rating for 'rate': 1 again, 2 hard, 3 good, 4 easy. |
text | string | Answer text to match (choice) or type (typing mode) for 'answer'. |
kbb_get_events Get events
Retrieves events emitted by the app since a sequence number — such as which node the user clicked. The current sequence number is available in kbb_status.
| Parameter | Type | Description |
|---|---|---|
since | integer | Default 0 (everything in buffer). |
kbb_wait_for_event Wait for event
Blocks until the user interacts in the app or until timeout expires. Enables reacting to user selections instead of polling. On a shared knowledge base, 'collab_comment' reports comments by others, 'collab_change' their edits and 'collab_stage' each step of a live presentation (kind started/step/ended). Keep timeoutSeconds at 45 or below — many MCP clients cancel calls after 60 s. Waiting in a loop: pass the 'seq' of the last event you handled (or 'latestSeq' after a timeout) as sinceSeq — an event that arrived between two waits is then returned at once instead of being missed.
| Parameter | Type | Description |
|---|---|---|
events | array | Only wait for these event types, e.g. ["node_selected"]. |
sinceSeq | integer | Return an already buffered matching event newer than this sequence number first. |
timeoutSeconds | integer | Default 30. |