kbb-mcp-relay

v1.3.0
kbb-mcp-relay Checked 4 hours ago Published 6 days ago

MCP 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.

ParameterTypeDescription
runIdstringRun 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.

ParameterTypeDescription
query *stringSearch query string.
limitintegerDefault 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.

ParameterTypeDescription
itemId *integerItem ID.
includeNotebooleanInclude 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.

ParameterTypeDescription
itemIds *arrayItem 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…

ParameterTypeDescription
descendingbooleanSort newest first.
fieldstringDate field to search and sort by. Default 'start'.
filterobjectAdditional conditions, for example {"op":"or","c":[{"k":"status","op":"eq","v":"open"},{"k":"priority","op":"ge","v":4}]}.
fromstringStart of the range, included.
groupBystringReturn counts per period instead of the nodes.
maxResultsintegerMaximum number of nodes. Default 200.
tostringEnd 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.

ParameterTypeDescription
depthintegerTraversal depth. Default 1.
itemIdintegerCenter node ID. If omitted, the current root item is used.
maxItemsintegerMaximum 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.

ParameterTypeDescription
typestringFilter 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.

ParameterTypeDescription
categoryIdintegerID of the item category. -1 = items without category.
categoryNamestringName of the item category. Resolved to its ID.
limitintegerMaximum 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.

ParameterTypeDescription
isRelationbooleanitemId denotes a connection, not a node. Default false.
itemIdintegerNode (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…

ParameterTypeDescription
itemsAlso 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.
nearestToobjectReturn 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.
timeoutMsintegerUpper bound for waitUntilIdle. Default 15000.
waitUntilIdlebooleanWait 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…

ParameterTypeDescription
centerbooleanCentre the excerpt on the bounding box afterwards. Default true.
coveragenumberTarget share of the viewport area for goal 'coverage', 0 to 1. Default 0.55.
dryRunbooleanReport what would happen without making any changes.
goalstringWhat to fit for. Default 'all'.
labelHeightnumberTarget median label height in pixels for goal 'labelHeight'. Default 90.
marginnumberMargin in pixels for goal 'all'. Default 40.
maxRoundsintegerMaximum adjustment rounds. Default 5.
maxZoomnumberUpper clamp for the zoom factor. Default 3.0.
minZoomnumberLower 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.

ParameterTypeDescription
name *stringName of the node.
categorystringCategory/item template.
descriptionstringShort description (single-line tooltip).
dryRunbooleanReport what would happen without making any changes.
notestringHTML note content.
parentIdintegerExisting parent node ID to connect to.
relationstringLabel of the connection to the parent.
tagsarrayTag labels.
undoLabelstringLabel for the undo group. Default: 'AI: <ToolName>'.
urlstringDirect 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").

ParameterTypeDescription
nodes *arrayNodes to create.
dryRunbooleanReport what would happen without making any changes.
relationsarrayConnections between nodes.
rootParentIdintegerExisting parent node ID to attach rootless nodes to. If omitted, creates a freestanding subgraph.
undoLabelstringLabel for the undo group. Default: 'AI: <ToolName>'.

kbb_update_node Update node

Updates fields of an existing node. Fields that are omitted remain unchanged.

ParameterTypeDescription
itemId *integerItem ID of the node to update.
categorystringNew category/item template.
descriptionstringNew short description (tooltip).
dryRunbooleanReport what would happen without making any changes.
namestringNew node name.
notestringNew HTML note content.
tagsarrayNew tag labels.
undoLabelstringLabel for the undo group. Default: 'AI: <ToolName>'.
urlstringNew 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.

ParameterTypeDescription
itemId *integerItem ID of the node.
dryRunbooleanReport what would happen without making any changes.
durationDaysnumberAlternative to 'end': length of the period in days, counted from 'start'.
durationHoursnumberAlternative to 'end': length of the period in hours, counted from 'start'.
endEnd of the period.
fieldsobjectFurther user data values such as {"status":"open","priority":4}. null removes a field.
startPoint in time or start of the period.
undoLabelstringLabel 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').

ParameterTypeDescription
relationId *integerConnection 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.

ParameterTypeDescription
relationId *integerConnection ID, from kbb_get_neighborhood.
asTablebooleanShow the forward direction as a table row inside the item instead of a line.
backAsTablebooleanThe same for the reverse direction.
backLabelstringLabel in the reverse direction.
categorystringRelation template/category. Created automatically if it does not exist.
descriptionstringDescription of the connection.
dryRunbooleanReport what would happen without making any changes.
labelstringLabel in the forward direction.
tagsarrayTag labels.
undoLabelstringLabel for the undo group. Default: 'AI: <ToolName>'.

kbb_delete Delete

Deletes nodes or connections. Can be undone via kbb_undo.

ParameterTypeDescription
dryRunbooleanReport what would happen without making any changes.
itemIdsarrayNode IDs to delete.
relationIdsarrayConnection IDs to delete.
undoLabelstringLabel 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…

ParameterTypeDescription
arrowsstringArrow heads of a connection. Connections only.
colorstringHex background color of a node, or line color of a connection, e.g. "#c0392b".
dryRunbooleanReport what would happen without making any changes.
iconItem 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…
itemIdsarrayTarget node item IDs.
lineStylestringLine style of a connection. Connections only.
lineWidthstringLine width of a connection. Connections only.
relationIdsarrayTarget connection IDs, from kbb_get_neighborhood ('relations[].id').
shapestringNode shape. Nodes only.
textColorstringHex text color, e.g. "#ffffff".
undoLabelstringLabel 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.

ParameterTypeDescription
properties *objectKey-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…
dryRunbooleanReport what would happen without making any changes.
undoLabelstringLabel 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.

ParameterTypeDescription
name *stringCategory/Template name.
colorstringHex background color, e.g. "#c0392b".
dryRunbooleanReport what would happen without making any changes.
iconItem 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…
shapestringShape name (circle, rect, rhomb, hexagon, ...).
textColorstringHex text color.
typestringTemplate type. Default 'item'.
undoLabelstringLabel 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.

ParameterTypeDescription
categoryId *integerCategory ID from kbb_get_categories.
colorstringNew hex background color.
dryRunbooleanReport what would happen without making any changes.
iconItem 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…
namestringNew category name.
shapestringNew shape name.
textColorstringNew hex text color.
typestringTemplate type. Default 'item'.
undoLabelstringLabel 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.

ParameterTypeDescription
attachToItemId *integerNode (or connection) ID to link to.
dryRunbooleanReport what would happen without making any changes.
isRelationbooleanattachToItemId denotes a connection. Default false.
namestringRepository entry name. Must be unambiguous.
recordIdintegerRepository entry ID. Preferred over name.
undoLabelstringLabel 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…

ParameterTypeDescription
attachToItemIdintegerNode (or connection) to link the new entry to. Without it the entry only enters the repository.
dataUristringThe 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.
descriptionstringEntry description. Default: the data size, the way the app writes it.
dryRunbooleanReport what would happen without making any changes.
extractPreviewbooleanLet the relay render a thumbnail for documents. Default true; switch it off to keep the payload small or to skip a slow LibreOffice conversion.
extractTextbooleanLet the relay extract the text. Default true, unless 'text' is given.
fileNamestringFile 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…
filePathstringPath 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.
isRelationbooleanattachToItemId denotes a connection. Default false.
maxTextCharsintegerUpper bound for the extracted text. Default 100000, as in generate_metadata.py.
namestringEntry name. Default: the file name without its extension.
previewDataUristringThumbnail as a data URI, "data:image/png;base64,…". Only needed when the relay cannot render one itself; for images the app makes its own.
previewFilePathstringThumbnail as a local image file, read by the relay. Wins over its own rendering.
textstringText content of the file, so the full-text search reaches it. Leave it out to let the relay extract the text itself.
undoLabelstringLabel for the undo group. Default: 'AI: <ToolName>'.
updateExistingbooleanOverwrite an entry with the same uri (or name and type) instead of adding a second one.
uristringStable 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.

ParameterTypeDescription
attachmentId *integerID of the LINK, from kbb_get_attachments — not the node ID and not the repository entry ID.
dryRunbooleanReport what would happen without making any changes.
undoLabelstringLabel 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.

ParameterTypeDescription
recordId *integerRepository entry ID from kbb_get_attachments.
dryRunbooleanReport what would happen without making any changes.
undoLabelstringLabel 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).

ParameterTypeDescription
itemId *integerItem ID.
x *numberX coordinate relative to the board/parent element.
y *numberY coordinate relative to the board/parent element.
dryRunbooleanReport what would happen without making any changes.
undoLabelstringLabel 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.

ParameterTypeDescription
name *stringWhiteboard title.
categorystringCategory for the whiteboard root. Default: none.
dryRunbooleanReport what would happen without making any changes.
undoLabelstringLabel 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.

ParameterTypeDescription
dryRunbooleanReport what would happen without making any changes.
returnToPreviousRootbooleanOnly 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…
statestringEnter or leave whiteboard mode. Default 'enter'.
whiteboardIdintegerWhiteboard 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.

ParameterTypeDescription
dryRunbooleanReport what would happen without making any changes.
undoLabelstringLabel 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.

ParameterTypeDescription
dryRunbooleanReport what would happen without making any changes.
undoLabelstringLabel 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.

ParameterTypeDescription
itemId *integerCard item ID.
dryRunbooleanReport what would happen without making any changes.
newLaneTagstringNew swimlane tag.
newStatusCategorystringNew column status category.
oldLaneTagstringSwimlane tag to remove. Omit to keep all existing tags.
undoLabelstringLabel 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.

ParameterTypeDescription
steps *arraySequence of tool calls to execute.
dryRunbooleanReport what would happen without making any changes.
onErrorstringDefault "abort". When "continue", response contains partial results per step.
undoLabelstringLabel 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.

ParameterTypeDescription
directionstringDirection. Default "undo".
stepsintegerNumber of steps. Default 1.
toLabelstringUndo (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.

ParameterTypeDescription
name *stringDatabase name to create.
dryRunbooleanReport what would happen without making any changes.
switchTobooleanOpen 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.

ParameterTypeDescription
databaseIdintegerDatabase ID from kbb_list_databases.
namestringDatabase 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.

ParameterTypeDescription
databaseIdintegerDatabase ID from kbb_list_databases.
dryRunbooleanReport what would happen without making any changes.
namestringDatabase 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.

ParameterTypeDescription
includeNotesbooleanInclude 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.

ParameterTypeDescription
data *stringJSON string, or the object returned under 'data' by kbb_export_database.
dryRunbooleanReport what would happen without making any changes.
undoLabelstringLabel for the undo group. Default: 'AI: <ToolName>'.
updateExistingbooleanUpdate 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.

ParameterTypeDescription
articleTitle *stringWikipedia article title.
languagestringLanguage 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.

ParameterTypeDescription
sparqlQuery *stringSPARQL 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.

ParameterTypeDescription
pseudocode *stringIndented text block, one node per line.
dryRunbooleanReport what would happen without making any changes.
parentIdintegerExisting node to hang the top-level lines under.
undoLabelstringLabel 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.

ParameterTypeDescription
itemId *integerItem ID to focus as root.
searchTextstringOptional text to highlight.

kbb_select_nodes Select nodes

Selects nodes in the diagram without changing the root node.

ParameterTypeDescription
itemIds *arrayItem 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.

ParameterTypeDescription
mode *stringTarget 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.

ParameterTypeDescription
layout *integerLayout number. 20 = Kanban. 19 is not allowed here.
threeDbooleanSet 3D layout instead of 2D. Default false.
undoLabelstringLabel 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.

ParameterTypeDescription
distancenumberNode distance factor, 1 = 100 %. Matches stretchFact.
perspectivenumberPerspective in percent, 0-100.
resetbooleanReset all four sliders to their default.
rotationnumberRotation in degrees, 0-360.
stretchnumberDeprecated alias for distance.
zoomnumberZoom 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.

ParameterTypeDescription
name *stringBookmark name.
dryRunbooleanReport what would happen without making any changes.
saveRootItembooleanInclude the current root item. Default true.
setAsInitialbooleanUse 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.

ParameterTypeDescription
indexintegerBookmark index from kbb_list_bookmarks.
namestringBookmark name.

kbb_set_camera_3d Set 3D camera

Sets and locks exact 3D camera coordinates and rotation for deterministic 3D rendering.

ParameterTypeDescription
lockbooleanLock camera from mouse drag.
positionobjectCamera position.
rotationobjectCamera 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.

ParameterTypeDescription
panel *stringPanel to control. "tools" holds the whiteboard list, the Kanban sections, presentation and learning mode.
sectionstringCollapsible 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…
statestringDesired 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…

ParameterTypeDescription
actionstringWhat to do. Default 'state'.
endFieldField holding the end of a period. null restores the automatic choice.
fieldDate field the strip draws. null restores the automatic choice, in which every field declared by the types of the database is drawn.
fromstringStart of the visible period, for action 'range'.
heightintegerHeight of the strip in pixels.
tostringEnd 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.

ParameterTypeDescription
allLabelsbooleanThe '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.
animateTransitionsbooleanAnimate transitions ('atran').
categoriesbooleanShow the category label on an item.
crossLinksbooleanDraw connections that are not tree edges ('wcl').
decreaseChildElementsstringHow child items shrink with depth ('dce').
depthFog3Dboolean3D 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).
descriptionTagbooleanShow the marker for items that carry a description.
duplicateRelationsAsOnebooleanCollapse several connections between the same two items into one line ('sdrao').
expandItemsbooleanDraw items in their expanded form ('iex').
hiddenRelationCountbooleanShow the number of hidden connections.
itemShiftbooleanShow the marker for manually shifted items.
lightCardsbooleanLight 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…
markRootItembooleanMark the root item ('mri').
moreRelationCountbooleanShow the number of further connections.
noteTagbooleanShow the marker for items that carry a note.
tableRelationsbooleanAdditionally draw connections that are shown as a table row ('wtr').
undoLabelstringLabel for the undo group. Default: 'AI: <ToolName>'.
userDatabooleanShow 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.
userDataChipsbooleanDraw 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.

ParameterTypeDescription
actionstringWhat to do. Default 'back'.
indexintegerFor '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).

ParameterTypeDescription
limitintegerMaximum 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.

ParameterTypeDescription
script *arrayArray of screenplay actions or macros.
runDetachedbooleanAnswer immediately with a runId instead of waiting. Required for scripts that play longer than about 50 s. Default false.
skipSpeechbooleanDisable TTS narration for this run. Default false.
speedstringPlayback 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.

ParameterTypeDescription
speedFactnumberSpeed multiplier. Default 1.0.
targetPosobjectTarget pixel coordinate.
targetSelectorstringCSS 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.

ParameterTypeDescription
buttonstringMouse button. Default 'left'.
doubleClickbooleanTrigger double-click. Default false.
itemIdintegerNode to click, in 2D and 3D. Used when targetSelector is omitted.
relationIdinteger3D only: connection to click. Used when targetSelector and itemId are omitted.
speedFactnumberSpeed multiplier. Default 1.0.
targetSelectorstringTarget 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.

ParameterTypeDescription
dxnumberDelta X pixels if dragging by distance.
dynumberDelta Y pixels if dragging by distance.
fromItemIdintegerSource node of a new connection (2D and 3D).
fromSelectorstringSource element CSS selector.
relationEndstringWhich end of relationId to drag. Default 'end'.
relationIdinteger3D only: connection whose start or end is dragged to toItemId.
speedFactnumberSpeed multiplier. Default 1.0.
toItemIdintegerTarget node of a new connection, or the node a connection end is moved to.
toSelectorstringTarget 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…

ParameterTypeDescription
itemId *integerCard item ID.
dryRunbooleanReport what would happen without making any changes.
positionstringWhere 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.
speedFactnumberSpeed multiplier. Default 1.0.
toColumnTarget column: its name as written on the board, or its number from the left, starting at 0. Omit to keep the current column.
toLaneTarget 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.

ParameterTypeDescription
targetSelector *stringTarget input, textarea, or iframe CSS selector.
text *stringText to type.
pastebooleanInstant paste instead of character-by-character. Default false.
speedFactnumberSpeed multiplier. Default 1.0.
withKeyboardbooleanSimulate 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.

ParameterTypeDescription
text *stringText to speak.
rateintegerSpeech rate in percent, 100 = 1.0x. Default: the screenplay rate.
voiceIndexintegerIndex into the browser voice list. Default: the screenplay voice.
waitForFinishedbooleanReturn 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.

ParameterTypeDescription
action *stringAction to perform on the panel.
htmlContentstringHTML 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…

ParameterTypeDescription
actionstringWhat to do. Default 'status'.
imageZoomboolean'start': slow zoom into the photo of the image slide (35 % over 5 s). Default: the app's current setting.
imagesboolean'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…
itemIdinteger'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.
showFirstStepboolean'start': show the first step right away. Default true — with false the mode is armed but the picture stays as it is.
stepinteger'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…

ParameterTypeDescription
actionstringWhat to do. Default 'show'.
backgroundstringColor behind the image, any CSS color. Default '#000000'.
fadeintegerFade in/out and cross-fade duration in ms. Default 240.
fitstring'contain' shows the whole image and letterboxes it, 'cover' fills the frame and crops. Default 'contain'.
idstringOverlay id, reported back in status. Generated when omitted.
kenstringKen Burns preset. The direction names where the visible section travels. Default 'in' — a slow 6 % zoom in. Use 'none' for a dead still.
kenDurationintegerLength of the move in ms. Default 8000. Set it to the beat length so the move ends with the beat.
kenEasingstringCSS timing function of the move. Default 'linear' — anything else reads as a camera stutter.
kenFromobjectOwn start state, overrides the preset.
kenToobjectOwn end state, overrides the preset.
recordIdintegerRepository record to show, from kbb_get_attachments. Must be an image.
recordNamestringRepository record by name — exact match first, then the first one containing it.
urlstringImage 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.

ParameterTypeDescription
itemIdintegerItem ID to present.
itemNamestringItem name to present.
narratebooleanSpeak item title and description. Default true.
speechTextstringCustom 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…

ParameterTypeDescription
namestringDisplay name to use from now on, e.g. 'Claude' or 'Gemini'. Max 32 characters.
sinceRevintegerAlso 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.

ParameterTypeDescription
state *stringWhat you are doing now.
etaSecondsintegerExpected duration. After it, silence counts as overdue.
notestringShort 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.

ParameterTypeDescription
includeDonebooleanAlso return resolved threads. Default false.
itemIdintegerOnly threads on this item.
relationIdintegerOnly threads on this relation.
sincestringThe '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.

ParameterTypeDescription
commentId *stringcommentId 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…

ParameterTypeDescription
actionstringDefault 'add'.
attachCapturebooleanadd, reply: attach a picture of your current view. Shared knowledge bases only.
captureMaxSizeintegerLongest side of the attached picture in pixels. Default 960.
commentIdstringdelete: comment ID.
itemIdintegeradd: item to comment on.
relationIdintegeradd: relation to comment on (instead of itemId).
stageSeqintegeradd, reply: refer to this step of a live presentation (seq from collab_stage); prefixed as '[Step n]'.
textstringadd, reply: comment text, max 2000 characters.
threadIdstringreply, 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…

ParameterTypeDescription
actionstringDefault '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.

ParameterTypeDescription
maxSizeintegerLongest side in pixels. Default 1280.
qualitynumberJPEG 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.

ParameterTypeDescription
text *stringNarration 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…

ParameterTypeDescription
filterstring'due' (default): due now; 'problem': forgotten at least twice or recall below 80 %; 'all'.
limitintegerMaximum 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.

ParameterTypeDescription
answers *arrayAnswers 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).

ParameterTypeDescription
activebooleanOnly for mode 'map': true to enable Knowledge Map (default), false to disable.
cardKeysarrayExact list of card keys to present in deterministic order without shuffling (used with mode 'learn').
itemIdsarrayNodes to learn (must be in the displayed diagram).
modestring'dialog' (default): open setup dialog; 'learn': start session immediately; 'exam': exam dialog; 'stats': statistics dialog; 'map': toggle Knowledge Map.
optionsobjectOptional learning session display/behavior toggles applied before starting.
scopestringScope 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.

ParameterTypeDescription
action *stringAction to perform on the active learning UI.
indexinteger0-based option index for 'answer' (single choice / true-false).
indicesarray0-based option indices for 'answer' on multi-select Parts cards.
ratingintegerSelf-rating for 'rate': 1 again, 2 hard, 3 good, 4 easy.
textstringAnswer 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.

ParameterTypeDescription
sinceintegerDefault 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.

ParameterTypeDescription
eventsarrayOnly wait for these event types, e.g. ["node_selected"].
sinceSeqintegerReturn an already buffered matching event newer than this sequence number first.
timeoutSecondsintegerDefault 30.